You are viewing a single comment's thread. Return to all comments →
Simple Java implementation:
class Checker implements Comparator<Player> { @Override public int compare(Player a, Player b) { if(a.score != b.score) { return b.score - a.score; } return a.name.compareTo(b.name); } }
Sorting: Comparator
You are viewing a single comment's thread. Return to all comments →
Simple Java implementation: