SCJP Certification

Sun Certified Java Programmer Certification exam essentials

January 28th, 2010

What is a WeakHashMap?

Java Facts, by Daisy Williams.

A WeakHashMap interface extends AbstractMap and implements Map. It is a hashtable-based Map implementation with weak keys. An entry in a WeakHashMap will automatically be removed when its key is no longer in ordinary use. When a key has been discarded its entry is effectively removed from the map, so this class behaves somewhat differently than other Map implementations.

Both null values and the null key are supported. This class has performance characteristics similar to those of the HashMap class, and has the same efficiency parameters of initial capacity and load factor.

Share

Back Top

Responses to “What is a WeakHashMap?”

Comments (0) Trackbacks (0) Leave a comment Trackback url
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Your email address will not be published. Required fields are marked *

*