Driver program to test above function
public static void main ( String args [ ] ) { int arr [ ] = { 1000 , 11 , 445 , 1 , 330 , 3000 } ; int arr_size = 6 ; Pair minmax = getMinMax ( arr , arr_size ) ; System . out . printf ( " Minimum element is % d ", minmax.min); System . out . printf ( " Maximum element is % d ", minmax.max); } }