import java.util.HashMap;
import java.util.Collections;
import java.util.Map;
public class MyClass {
public static void main(String args[]) {
HashMap<Integer,Integer> hmap = new HashMap<Integer, Integer>();
hmap.put(1, 45);
hmap.put(2, 75);
hmap.put(3, 98);
hmap.put(4, 30);
hmap.put(5, 81);
hmap.put(5, 95);
int maxValue = Collections.max(hmap.values());
for (Map.Entry<Integer, Integer> entry : hmap.entrySet()) {
if (entry.getValue() == maxValue) {
System.out.println(entry.getKey());
break;
}
}
}
}
/*
run:
3
*/