290 likes | 512 Views
2. A simple map: Hashtable. To create a Hashtable, use: import java.util.*; Hashtable table = new Hashtable(); To put things into a Hashtable, use: table.put(key, value); To retrieve a value from a Hashtable, use: value = table.get(key);. 3. Example use of a Hashtable. import java.util.*; public class HashtableUser { public static void main(String[] args) { Hashtable<String, String> table = new Hashtable<String, String>(); table.put(31910
E N D