I'm using this code:
public static void printMap(Map<Integer, String> obj) {
        for (Map.Entry e : obj.entrySet()) {
            if (e.getKey() == 3) {
                System.out.println("OK!");
            }
        }
    }
and it works in Java 7. But in Java 6 it gives an error on the line:
if (e.getKey() == 3) {
Can anyone explain to me why I get this error?
 
     
     
     
     
    