You are viewing a single comment's thread. Return to all comments →
Java #
public int compare(Player a, Player b) { int ageComarator = Integer.valueOf(b.score).compareTo(a.score); if (ageComarator != 0) { return ageComarator; } else { return a.name.compareTo(b.name); } }
Seems like cookies are disabled on this browser, please enable them to open this website
Sorting: Comparator
You are viewing a single comment's thread. Return to all comments →
Java #