I need to sort my arraylist which has some java bean objects.I tried Collections.sort() to do so.But I could not.
Is there any way to do so?
Printable View
I need to sort my arraylist which has some java bean objects.I tried Collections.sort() to do so.But I could not.
Is there any way to do so?
I did not.Is the reason for that issue?
Check this out. ;)
http://www.java-forums.org/java-tuto...s-sorting.html
If you don't want the class to have to implement Comparable you create a Comparator<T> object and use this in the Collections.sort(...) overload that takes a Comparable as the second parameter.