public static <T>boolean isEmpty(T[] array){
  return array == null || array.length == 0;
}

public static < T > boolean isEmpty ( T [ ] array ) { return array == null || array . length == 0 ; }
checks if given array is null or has zero elements .
