Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Override
- public int compareTo(CandidateInterface other) {
- int myTotalvotes = getVoteCount();
- int otherTotalvotes = other.getVoteCount();
- int difference = myTotalvotes - otherTotalvotes;
- if (difference != 0) {
- return difference;
- }
- difference = getLastName().compareTo(other.getLastName());
- return difference;
- }
Add Comment
Please, Sign In to add comment