LearnFrenzy
Sign in Take a free test

HashMap and TreeMap · HashMap and TreeMap MCQ · Question 17

Hashtable versus HashMap Answer, explanation & discussion

  • MCQ
  • Medium
  • 0 comments
  • Answer explained
  • Moderated community
Question 17 Back to Exercise

Which statement about Hashtable is true?

  • A It allows a null key
  • B It is a legacy synchronized class that allows no null keys or values Correct
  • C It keeps keys sorted
  • D It is faster than HashMap
Correct Answer: Option B

Use HashMap, or ConcurrentHashMap for concurrency.

Discussion & Comments 0

Share your method, a shortcut, or ask about a step you didn't follow.

No comments yet. Be the first to share your solution!

Post your comment

Comments appear after a quick review by our team.

Search LearnFrenzy

Esc

Quick links