freetimestudys@gmail.com          +91-7097633380
  Login Here                        

char charAt(int i):

This method returns a character at specified location ‘i’.
Signature
The signature of string charAt() method is given below:
public char charAt(int index)  

String charAt program

class Test
{
public static void main(String[] args)
{
String str="freetimestudy";
System.out.println(str.charAt(1));
char ch="freetimestudy".charAt(2);
System.out.println(ch);
}
}

intput and output

output:r,,e