w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Get method of an hashmap with key as another hashmap always returns null values

You also have to understand that the key will only work if you have the exact same object instance for adding and retrieving from the map and the key is not allowed to never change, because comparison will check if the key is the same instance using equals() and hashCode().

This article describes issues about using object as key in a hashmap.

Most likely, the problem you are facing is related to those requirements.





© Copyright 2018 w3hello.com Publishing Limited. All rights reserved.