+1 vote
in JAVA by
How do WeakHashMap works?

1 Answer

0 votes
by

WeakHashMap works like a normal HashMap but uses WeakReference for keys, which means if the key object doesn't have any reference then both key/value mapping will become eligible for garbage collection.

Related questions

0 votes
asked Jan 27, 2020 in JAVA by rahuljain1
+1 vote
asked Mar 11, 2021 in JAVA by rajeshsharma
...