String charAt()

Let us understand charAt() method This method returns the character at the specified index and Index starts from 0 Method signature public char charAt(int index) public char charAt(int index) This method throws StringIndexOutOfBoundsException exception When, index is either negative or greater than or equal to the size of the string Example public class CharAtExample1{   […]

Share this article on