String[] anArray = new String[]{"a","b","c"} String valueToFind = "b"; for(int i=0; i