Since array size is 7 , elements should be from 0 to 48
int arr [ ] = { 40 , 12 , 45 , 32 , 33 , 1 , 22 } ; int n = arr . length ; System . out . println ( " Given ▁ array " ) ; ob . printArr ( arr , n ) ; ob . sort ( arr , n ) ; System . out . println ( " Sorted ▁ array " ) ; ob . printArr ( arr , n ) ; } }