aspose file tools*
The moose likes Java in General and the fly likes Sorting keys automatically Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Sorting keys automatically" Watch "Sorting keys automatically" New topic
Author

Sorting keys automatically

thomas davis
Ranch Hand

Joined: Feb 01, 2003
Posts: 207
Which collection interface does Sort the keys automatically ?
1.MAP
2.SET
3.TreeMap
4.SortedSet
Steve Lovelace
Ranch Hand

Joined: Sep 03, 2003
Posts: 125
  • MAP - you must mean Map: keys but no sorting
  • SET - you must mean Set: no keys and no sorting
  • TreeMap - keys and sorting, but this is not an interface - it is a concrete class
  • SortedSet: sorting but no keys

  • [ September 30, 2003: Message edited by: Steve Lovelace ]

    The Inner that is named is not the true Inner.
    Stan James
    (instanceof Sidekick)
    Ranch Hand

    Joined: Jan 29, 2003
    Posts: 8791
    See if this collections crib sheet helps. It's really brief, but should point you to some interesting places in the JDK docs.


    A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
     
    I agree. Here's the link: http://aspose.com/file-tools
     
    subject: Sorting keys automatically