Worked example
Collections.sort(list, new Comparator<Student>() {
public int compare(Student p, Student q) {
return p.getName().compareTo(q.getName());
}
});
Two interfaces, one job, different placement. Comparable is implemented by the class and answers «how do I compare to another?». Comparator is a separate object and answers «how do I compare these two?». One class can be sorted by any number of Comparators without being touched.