A,B,C,D are all wrong. B is better than the others.
Insert Comparator<Person> on line 1.
Correct.
Insert -
public int compare(Person person) {
return person.name.compareTo(this.name);
}
on line 2.
is correct.
upvoted 1 times
...
Log in to ExamTopics
Sign in:
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
Sa16253748596
5 months, 2 weeks ago