public static int max ( int [ ] values ) { int max = Integer . MIN_VALUE ; for ( int i = 0 ; i < values . length ; ++ i ) { if ( max < values [ i ] ) { max = values [ i ] ; } } return max ; }
Find the maximum value from the given array .