Current location - Training Enrollment Network - Mathematics courses - Java mathematical sorting code
Java mathematical sorting code
Public? Static electricity Invalid? main(String[]? args)? {

Integer? []? Achievement = new? Integer[]{ 1,4,5,6,6,7,8,9 }; ? //Results? If you type on the keyboard, you can handle it yourself.

Comparator & lt integer & gtcom=new? Comparator < integer > ()? {

@ Overlay

Public? int? Comparison (integer? o 1,? Integer? o2)? {

//? Todo? Automatically generated? Method? cigarette end

Return? O2-o 1;

}

};

Arrays.sort (scores, com);

for(int? I: grades)

system . out . println(I);

}

}