code: public static <T> T getLast(T array[]){
          return array!=null && array.length>0 ? array[array.length-1] : null;
      }
docs: Returns last element in given {@code array}.
  <p>
  if {@code array} is null or of length zero, then returns {@code null}