• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

LinkedHashSet and order of elements

 
Barkat Mardhani
Ranch Hand
Posts: 787
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 787
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My mistake. I was looking at wrong answer.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic