To answer your question, a Comparator is any class that implements the java.util.Comparator interface.
Collections.sort() expects two arguements, the first is a java.util.List of things to sort, the second is a description of how to compare the items in the list. In effect you are saying "here is a list of things and here is how to sort them"
When you try to call Collections.sort you are not passing a java.util.Comparator so the parser gets confused and throws you an error.
DAYANAND BURAMSHETTY is correct (but loud) in saying you can do the ordering at the database end but that won't teach you about Comparators.
You need to create a class that implements Comparator like this:
public class MyComparator implements java.util.Comparator
If you have a look at the javadoc for java.util.Comparator, you have to define two methods for it to act as a Comparator:
int compare(Object o1, Object o2)
and
boolean equals(Object obj)
create an implementation of the compare method so that it creates an absolute odrdering of your objects then pass an instance of youre Comparator to the sort method...
Collections.sort(v, new MyComparator());
um, verbose but helpful I hope...
Dave.
ps I think I'm coming down with a cold cos I'm definitely rambling