In Java, I need to be able to get the subscript value of an array item. Say in a sting array, letters[25] stores the letter Z. If my user inputs a Z, I need to get that subscript value 25 as an integer (so I can plug it in later in another array that contains other correlated data).
My array letters[] has 26 elements, basically A through Z such that letters[0] = A and so on. I have another array containing integer values (also 26 total elements). Trying to convert letters to number values.
java.util.Arrayshas a lot ofbinarySearchmethods.