How to get keys from a hashmap in java? | Sololearn: Learn to code for FREE!
Nouvelle formation ! Tous les codeurs devraient apprendre l'IA générative !
Essayez une leçon gratuite
0

How to get keys from a hashmap in java?

I have a hashmap with a number of values.I want to get the key from map using its value.

22nd Aug 2019, 5:12 PM
_rk
_rk - avatar
1 Réponse
+ 8
There exists a method keySet() which returns a set of the keys. https://code.sololearn.com/c7BrlKiE1Uxp/?ref=app
22nd Aug 2019, 5:29 PM
Denise Roßberg
Denise Roßberg - avatar