You are viewing a single comment's thread. Return to all comments →
Mine passed all tests
class Checker implements Comparator<Player>{ @Override public int compare(Player a, Player b){ if (a.score == b.score){ return a.name.compareTo(b.name);//alphabetically } else { return b.score - a.score;//decreasing } } }
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 →
Mine passed all tests