This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
Question : All I am doing here is trying to print the Integer Object that I get out of map.get(1) . I did not treat it as String Object
Actually, you did. You declared the map as having strings as values (generics) -- and then you placed integers into them, by not using generics. So you effectively tricked the compiler into thinking that you were working with strings, and to use the println() method that took a string, instead of one that took an object.