I wanted to know if there\'s a native method in array for Java to get the index of the table for a given value ?
Let\'s say my table contains these strings :
Use this as a method with x being any number initially. The string y being passed in by console and v is the array to search!
public static int getIndex(int x, String y, String[]v){ for(int m = 0; m < v.length; m++){ if (v[m].equalsIgnoreCase(y)){ x = m; } } return x; }