8,9,4,10,5,6,1 Integer [] arr2={};//array wrapper class
The Arrays. Sort (arr2, new Comparator
@ Override//rewrite the compare of the interface methods
Public int the compare (Integer o1, o2) Integer {
The Integer In1=(Integer) o1;
The Integer In2=(Integer) o2;
Return In1 and In2.
}
});
System. The out. Println (Arrays. ToString (arr2));