aspose file tools*
The moose likes Beginning Java and the fly likes Usage of Collection classes sorting mechanism in a project Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Usage of Collection classes sorting mechanism in a project" Watch "Usage of Collection classes sorting mechanism in a project" New topic
Author

Usage of Collection classes sorting mechanism in a project

Ravi Kiran Va
Ranch Hand

Joined: Apr 18, 2009
Posts: 2234

Hi

I am having a query againist the usage of a Comparator or Comparable or Collection classes sort Mechanism in util package .

Can any body please tell me where actually this concept will be used in a project.
(What i think is that as the data from database will be returned by applying order by know )

Thank you .


Save India From Corruption - Anna Hazare.
salvin francis
Ranch Hand

Joined: Jan 12, 2009
Posts: 928

great example:
http://www.javadeveloper.co.in/java-example/java-comparator-example.html

if your data is coming from a database, i would prefer to do the sorting in the query itself rather than code unless
it involves user sorting a subset of data shown in UI, at that point i would use it in code.


My Website: [Salvin.in] Cool your mind:[Salvin.in/painting] My Sally:[Salvin.in/sally]
 
Don't get me started about those stupid light bulbs.
 
subject: Usage of Collection classes sorting mechanism in a project