Android examples for java.lang:Array Element
Generic method to Search index Of an item in an array
//package com.java2s; public class Main { public static <T> int indexOf(T[] array, T object) { for (int i = 0; i < array.length; i++) { if (object.equals(array[i])) { return i; }/*from www .j a v a 2 s . c o m*/ } return -1; } }