Hi friends
guide me
to sorting java list contains multiple list objects
If you have a list of objects that you want to sort then the objects have to define
a (mathematically speaking) PTO (Partial Total Ordering). It implies that you
have to be able to determine if O1 < O2 or O1 == O2. The relation O1 > O2
follows from the other two relations. Java solves this by demanding the class to
implement the
Comparable interface; or alternatively you have to create
an external
Comparator that implements the relations.
Read the API documentation for the interfaces mentioned above and also study
the
Collections.sort() method.
kind regards,
Jos