charAt()

Write a program in java to demonstrate substring() and charAt() method?

class StringSub {                 public static void main(String arg[])                 {                                 String s=”india”;                                 System.out.println(s.substring(1,4));                                 System.out.println(s.charAt(2));                 }…

Read More