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.
How come suddenly the get() method returns an integer? Please be detailed in your answer as i would like to derive a rule from it. Or simply jst provide me with a rule/s around this problem. My first topic from south africa. Thank you
Actually, in your Test class String is not java.lang.String, it is the type parameter of generic class Test<String> which will be substituted by the actual type, and in your case, the actual type is java.lang.Integer. More generally, we can say type parameter is the placeholder of the actual type and we can declare any legal identifier as type parameter.