You are viewing a single comment's thread. Return to all comments →
public int compare(Player a, Player b) { if(a.score == b.score) { return a.name.compareTo(b.name); }else { return Integer.valueOf(b.score).compareTo(a.score); } }
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 →