Java charAt () method
charAt () method returns the character at the specified index. The index ranges from 0 to length () - 1.
grammar
public char charAt(int index)
parameter
index - theindex characters.
return value
Returns the character at the specified index.
Examples
public class Test { public static void main(String args[]) { String s = "www.w3big.com"; char result = s.charAt(8); System.out.println(result); } }
The above program execution results:
o