Lot of questions... (I like it!)
OK, let's take them one by one:
- String are plain objects (with special status in Java, overriding + and having a special init syntax...).
- In old versions of Java, you would have an error on your code. Since Java 1.5, you are lucky, it automatically wraps your numbers in objects (class Integer) and unwraps them when you get them.
It is called autoboxing (putting in a box) and unboxing.
That's one of the rare new features of Java 1.5 we can use in Processing (no syntax change).
You can find the complete reference on HashMap, Map and other classes in the
Java™ Platform, Standard Edition 6 API Specification.
In short, Iterator allows... to iterate on a Collection, Map is an interface, a kind of blueprint for related Collections like HashMap (which is a concrete implementation) while Map.Entry is just a key-value pair definition.
Also print/println and string concatenation just use the toString() method all objects in Java has, that's why it works whatever the kind of objects you have used as key or value.