The object pushed onto the stack is a MapEntry, according to the entrySet() Javadocs. A MapEntry has "key" and "value" properties. The "value" property is the object stored in the map. You're printing the "value" property--I'm not sure what you expected.