If the Java memory manager no longer has a strong reference to the object specified as a key, then the entry in the map will be removed.
Creating a WeakHashMap: The four constructors of WeakHashMap are the same as HashMap
public WeakHashMap() public WeakHashMap(int initialCapacity) public WeakHashMap(int initialCapacity, float loadFactor) public WeakHashMap(Map map)