public static <T>boolean contains(T[] array,T value){
  for (  T element : array) {
    if (element == null) {
      if (value == null)       return true;
    }
 else {
      if (value != null && element.equals(value))       return true;
    }
  }
  return false;
}

public static < T > boolean contains ( T [ ] array , T value ) { for ( T element : array ) { if ( element == null ) { if ( value == null ) return true ; } else { if ( value != null && element . equals ( value ) ) return true ; } } return false ; }
checks that value is present as at least one of the elements of the array .
