import java.util.HashMap;
import java.util.Map;
public class MyClass {
public static void main(String args[]) {
HashMap<String, Integer> hm = new HashMap<>();
hm.put("Java", 423);
hm.put("C++", 756);
hm.put("Python", 908);
hm.put("C", 183);
hm.put("PHP", 302);
Map.Entry<String, Integer> firstEntry = hm.entrySet().iterator().next();
String firstKey = firstEntry.getKey();
Integer firstValue = firstEntry.getValue();
System.out.println("First key: " + firstKey);
System.out.println("First value: " + firstValue);
}
}
/*
run:
First key: Java
First value: 423
*/