Driver code
public static void main ( String [ ] args ) { int arr [ ] = { 2 , 3 , 5 , 4 , 5 , 3 , 4 } ; int size = 7 ; Arrays . sort ( arr ) ; System . out . println ( singleelement ( arr , size ) ) ; } }