If you are working with an array, you would not use any String class methods.

If index[x] is an int value it can be used as the index into another array:

anArray[anotherArray[x]]; // index...