string get character at index code example
Example 1: string get a letter by index
charAt(index)
Example 2: character at index of string java
String str = "Grepper";
char ch = str.charAt(0);
//ch is assigned the value of G
charAt(index)
String str = "Grepper";
char ch = str.charAt(0);
//ch is assigned the value of G