Quote:
|
Originally Posted by Arevos
Yes, you're right. Though, if you have Java 1.5:
Collections.sort(cInd, new Comparator<Person>() {
int compare(Person a, Person b) {
return a.getLastName().compareTo(b.getLastName());
}
}); (Assuming cInd is descended from List<Person>)
|
well it actually isn't descended from List<Person>, if I understand what you mean. cInd contains three kind of "persons" could be like this:
cInd {Person("FN", "LN"), Student("FN", "LN"), Worker("FN", "LN")} <- not meant to be anykind of syntax

just to clarify things.
Student and Worker are descended from Person.
Thanks for these tips allready, I'll try to get forward in this but I really am miserable in this.