Are you asking what HashMap and Hashtable are, or do you already know that and do you want to know when
you should use one or the other?
HashMap and Hashtable are both
associative array data structures.
Hashtable is a legacy collection class. You shouldn't use it anymore; instead, you should always use HashMap. If you really need a synchronized map, you should use the method java.util.Collections.synchronizedMap(...), for example: