How to read characters from a string ?

Hi, In my java program I accepted string from the user and now I want to calculate the length of the string, and then read characters one by one to encrypt it. How to read the characters one by one ? Like Mid$ function in VB.

"As long as there are tests, there will be prayer in public <br />schools."