The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
September 2000

Advertisement

Advertisement

This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.

Message:

Sorting in Java

Posted by Salil V Gangal on September 02, 2000 at 11:10 PM

Friends,

Is there any 'ready-made' data structure / sort routine which operates on record-like structures and sorts them by the given sort key ?

As an example if I have a simple table in the memory consisting of a row such as follows


Customer_Name char
January_Balance number
Februeary_Balance number
...
...
City char
State char

Then is there any 'ready-made' sorting that will sort this table in memory by any field(s) that I want ? Say January_Balance ? Or say a sort-within-a-sort by State and City ?

Regards,
Salil V Gangal



Replies:

Sponsored Links



Google
  Web Artima.com   
Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us