public static boolean contains ( Object [ ] arr , Object obj ) { if ( arr != null ) { for ( int i = 0 ; i < arr . length ; i ++ ) { Object arri = arr [ i ] ; if ( arri == obj || ( arri != null && arri . equals ( obj ) ) ) { return true ; } } } return false ; }
Returns where an object is in a given array .