Are you trying to get values ββfrom a HashMap using the get method or iterating over it? Regarding the get method, all the people above have answered this.
If you iterate over a HashMap using the entrySet method, the type of keys in your HashMap does not matter. In addition, having an entrySet entry at each iteration, finding values ββbecomes useless. Also note that an entrySet is usually preferable to a value method and a keySet method, since they both use the entrySet iterator internally and return either a key or a record value.
source share