Android examples for java.lang:array
find Array Index for string array
public class Main{ public static int findArrayIndex(String[] arr, String str) { int iReturn = -1; for (int i = 0; i < arr.length; i++) { if (arr[i].equals(str)) { iReturn = i;//from w ww.j a va2s.c o m break; } } return iReturn; } }