Java Professional — Hard
Key points
- WeakHashMap removes entries when keys are garbage collected
- Regular HashMap with WeakReference values keeps keys alive
- Key distinction: automatic entry removal in WeakHashMap
Ready to go further?
Related questions
Java Professional — Hard
Key points
Ready to go further?
Related questions