This week's giveaway is in the Java/Jakarta EE forum. We're giving away four copies of Java EE 8 High Performance and have Romain Manni-Bucau on-line! See Actually this is the question i want to ask
when to use WeakHashMap for storing Data ??
The Javadocs for WeakHashMap explain when it's appropriate to use - e.g. when you're using keys of a class that overrides the equals() method you can get unexpected behaviour. And that probably covers the majority of uses of Maps. Of those cases where it would be appropriate, it often won't make much difference.