Multiple choice technology programming languages

Which java collection class can be used to maintain the entries in the order in which they were last accessed?

  1. java.util.HashSet

  2. java.util.LinkedHashMap

  3. java.util.Hashtable

  4. java.util.Vector

  5. none of these

Reveal answer Fill a bubble to check yourself
E Correct answer
Explanation

The question asks for a collection that maintains entries by last-accessed order. HashSet doesn't maintain any access order. Hashtable is synchronized but doesn't track access order. Vector maintains insertion order, not access order. LinkedHashMap with accessOrder=true would be correct, but plain LinkedHashMap (default) maintains insertion order, not access order. Hence none of these are correct.