Multiple choice technology programming languages

Which of the most suitable java collection class for storing various currencies and their equivalent prices in USD if multiple threads access and modify this data? It is required that class should be synchronized inherently

  1. HashSet

  2. Vector

  3. HashMap

  4. TreeMap

  5. None of the above

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

The question requires storing currencies (keys) with USD prices (values) in a thread-safe manner. HashSet and HashMap are not synchronized. Vector is synchronized but is a List, not a Map. TreeMap is not inherently synchronized. Hashtable would be the correct synchronized Map choice, but it's not listed. Therefore 'None of the above' is correct.