Check out example codes for "string char at java". It will help you in understanding the concepts better.

Code Example 1

String str = "Grepper";
char ch = str.charAt(0);
//ch is assigned the value of G

Code Example 2

char ch=name.charAt(4);

Code Example 3

String words = "Hi There"; //creating a string var named 'words'
char index = words.charAt(0); /* setting a variable 'index' to letter
'0' of variable 'words'. In this case, index = 'H'.*/
System.out.println(index); //print var 'index' which will print "H"

Learn ReactJs, React Native from akashmittal.com