Home » Java Programming » Objects and Collections

Which collection class allows you to access its elements by associating a key with an element's value, and provides synchronization?

Correct Answer: java.util.Hashtable

Explanation:

Hashtable is the only class listed that provides synchronized methods. If you need synchronization great; otherwise, use HashMap, it's faster.

← Previous Question Next Question→

More Questions from Objects and Collections

Discussion & Comments

No comments yet. Be the first to comment!
Join Discussion