What does the String s have to do with the rest of your question? Do you want the array indices to equal the index of the character? If so, String has methods to do just that. The API is your friend.