Integer[] data = {9, 7, 8, 5, 6, 0, 1};
Comparator<Integer> comparator = new Comparator<Integer>() {
public int compare(Integer 01, Integer 02) {
if(o1 > 02) {
return 1;
} else {
return -1;
}
}
};
Array.sort(data, comparator);
Integer[] data = {9, 7, 8, 5, 6, 0, 1};
Comparator<Integer> comparator = new Comparator<Integer>() {
public int compare(Integer 01, Integer 02) {
if(o1 > 02) {
return 1;
} else {
return -1;
}
}
};
Array.sort(data, comparator);