vinay_delhi
asked on
How to Reverse HashMap, key becomes values and vice-versa
I have a HashMap with key-values. Sometime, I need to know key for a given value. Could anyone let me know how to do that ?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
{
Map.Entry entry = (Map.Entry)i.next();
System.out.println(entry.g
String key = (String) entry.getValue()
String value = (String) entry.getValue();
// if(value.equals("some")
}