charAt(), like the name implies, returns a char, not a string .
Read moreIs charAt in the string class?
The Java String class charAt() method returns a char value at the given index number . The index number starts from 0 and goes to n-1, where n is the length of the string. It returns StringIndexOutOfBoundsException, if the given index number is greater than or equal to this string length or a negative number.
Read moreCan you use charAt for string Java?
Java charAt The built-in Java string charAt() method returns a character at a particular index position in a string . The first character has the index value 0 and so on for subsequent characters in the string. charAt() accepts one parameter: the index position of the character you want to retrieve.1 Kas 2020
Read moreIs charAt a string method?
The charAt() method returns the character at a specified index (position) in a string . The index of the first character is 0, the second 1, …
Read more