You are viewing a single comment's thread. Return to all comments →
class Checker implements Comparator<Player> { @Override public int compare(Player o1, Player o2) { int score = o2.score - o1.score; if (score == 0) { return o1.name.compareTo(o2.name); } else { return score; } } }
Seems like cookies are disabled on this browser, please enable them to open this website
Java Comparator
You are viewing a single comment's thread. Return to all comments →