question: @ SuppressWarnings ( { "unchecked" , "rawtypes" } ) public static Comparable < ? > max ( Comparable < ? > [ ] ar ) { Comparable ret = ar [ 0 ] ; for ( int i = 1 ; i < ar . length ; i ++ ) { if ( ret . compareTo ( ar [ i ] ) < 0 ) { ret = ar [ i ] ; } } return ret ; }
target:  Locate the maximum value from an array of Comparables.