Results 1 to 2 of 2
Thread: java collection api
- 10-07-2010, 01:28 PM #1
Member
- Join Date
- Oct 2010
- Posts
- 17
- Rep Power
- 0
- 10-07-2010, 01:51 PM #2
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 11,399
- Blog Entries
- 7
- Rep Power
- 17
The elements are ordered in the way you insert them in an ordered collection; as a counter example a HashSet or an OrderedSet isn't ordered that way; the first one orders the elements it sees fit and the second one (despite its name it doesn't order the elements in the same order as you inserted them) orders the elements according to their 'natural' order, whatever that is; e.g. Strings are stored in lexicographical order.
kind regards,
Jos
Similar Threads
-
java collection arraylist in jdk 1.4
By jagdish_ in forum Advanced JavaReplies: 1Last Post: 06-12-2010, 02:19 PM -
Java Collection class & methods
By box2box in forum New To JavaReplies: 2Last Post: 05-26-2010, 01:51 AM -
know the class coming under the collection api in java
By javastuden in forum New To JavaReplies: 1Last Post: 11-24-2009, 07:10 AM -
Collection - java
By Moonlightkid in forum Advanced JavaReplies: 3Last Post: 09-02-2008, 05:04 AM -
Java Collection Framework (Sets)
By Java Tutorial in forum Java TutorialReplies: 0Last Post: 12-07-2007, 07:50 PM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks