Driver code
public static void main ( String args [ ] ) { int arr [ ] = { 5123 , 3300 , 783 , 1111 , 890 } ; int n = arr . length ; int max = Integer . MAX_VALUE ; int min = Integer . MIN_VALUE ; boolean flag = true ; for ( int i = 1 ; i < n ; i ++ ) {