It has a sort routine that wants a list, and something that implements the Comparator interface:
sort(List<T> list, Comparator<? super T> c)
You *could* create a class that implements Comparator outside the call; new an instance of that class; then pass the new instance of that class. This, however, lets you create a class on the fly (I think it's called an anonymous class; someone will call me on that if I'm wrong, I'm sure), and pass a new instance of that anonymous class as the comparator. The Comparator only wants a way to compare 2 instances of your list.
Hope the above makes sense. I'd have trouble writing it, but I *think* I understand it.
Hello from a new cattle drive guy, btw! I've just sent in 1b recently. I'm sure I'll have lots of questions posted soon.