My code:
HashMap<Integer,Student> Chemistry= new HashMap<Integer,Student>();
Chemistry.put(3333,"NICK");
for (int keys : Chemistry.keySet()){
System.out.println(keys + ":"+ Chemistry.get(keys));
}
the output is:
3333:Student@4aa298b7