You are viewing a single comment's thread. Return to all comments →
My answer:
class Checker implements Comparator<Player> { @Override public int compare(Player o1, Player o2) { return (o2.score == o1.score) ? o1.name.compareTo(o2.name) : o2.score - o1.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 →
My answer: