Code example for Hashtable

Methods: get, remove

0
        return o;
    } 
 
    /** remove element referred to by key NOT value; return false if not found. */ 
    public synchronized boolean removeElement(Object key) {
        Object value = index.get(key);
        if (value == null) {
            return false; 
        } 
        index.remove(key);
        elements.removeElement(value);
        return false; 
    } 
 
    public int size() { 
        return elements.size();
    } 
}