In JAVA, for this, we use the .charAt(int index) function. Basically, what this does is, it takes the index number in the argument that it needs to return the character present in the String. For example, if there is a String:
And the charAt() function is called:
This function will return the character present in String ar at index number 1. This implies that the value of ch is 'b' after the execution of that function.
The most basic JAVA coding mechanisms comprise of these methods so you should have a better understanding of these functions. If you'd like to go over your basics again, you should look into this: