aspose file tools*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes LinkedHashSet and order of elements Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "LinkedHashSet and order of elements" Watch "LinkedHashSet and order of elements" New topic
Author

LinkedHashSet and order of elements

Barkat Mardhani
Ranch Hand

Joined: Aug 05, 2002
Posts: 787
A question for Dan's Collection exam:

Which of the following classes allow elements to be accessed in the order that they were added?
a. ArrayList
b. LinkedHashMap
c. LinkedHashSet
d. LinkedList
e. HashMap
f. HashSet
g. Hashtable
h. TreeMap
i. TreeSet
j. Vector
k. WeakHashMap
l. None of the above

The answer is d. I believe it should be c and d. What about a?
Barkat Mardhani
Ranch Hand

Joined: Aug 05, 2002
Posts: 787
My mistake. I was looking at wrong answer.
 
Consider Paul's rocket mass heater.
 
subject: LinkedHashSet and order of elements