Hello!
Could anybody explain why the following code is not compile?
------------------------------------------------------------
Map map = new HashMap();
for (Map.Entry e: map.entrySet()){};
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
"compiler error: incompatible types
found : java.lang.Object
required: java.util.Map.Entry"
-------------------------------------------------------------
But on the other hand:
-------------------------------------------------------------
Map map = new HashMap();
for (Map.Entry e: (Set<Map.Entry>

map.entrySet()){};
-------------------------------------------------------------
and
-------------------------------------------------------------
Map map = new HashMap();
Itarable<Map.Entry> i = map.entrySet();
for (Map.Entry e: i){};
-------------------------------------------------------------
...are compiled well...