main.java
//Function to return max value of integer array
Function to return max value of integer array
Function to return max value of integer array
public static int MAX(int[] array){
        int max= Integer.MIN_VALUE;
        for (int x=0; x<array.length;x++){
            if(array[x]>max){
                max=array[x];
            }
        }
        return max;
    }
public static int MAX ( int [ ] array ) { int max = Integer . MIN_VALUE ; for ( int x = 0 ; x < array . length ; x ++ ) { if ( array [ x ] > max ) { max = array [ x ] ; } } return max ; }
Function to return max value of integer array
Function to return max value of integer array
//Set max to minimum possible value //loop for all array values //if value is greater then max set max to value //return max