public static <T> T max( T[] array ) {

        if (array.length > 1) {
            Sorting.sortDesc(array);

            return array[0];
        } else {
            return null;
        }
    }
public static < T > T max ( T [ ] array ) { if ( array . length > 1 ) { Sorting . sortDesc ( array ) ; return array [ 0 ] ; } else { return null ; } }
Gets the max item from the array.
Sorts the list descending first.

@param array the list
@param <T> type of items
@return the max item