public class StringHashtable { // Constructors public StringHashtable(); public StringHashtable(int size); // Methods public Object get(String key); public Object get(char chars[], int offset, int length); public Object put(String key, Object value); }
This simple hashtable uses strings as the keys.
public StringHashtable();Construct empty hashtable.
public StringHashtable(int size);Construct empty hashtable.
public Object get(String key);Get a value from the hashtable.
public Object get(char chars[], int offset, int length);Get a value from the hashtable.
public Object put(String key, Object value);Add object to the hashtable.