This week's book giveaway is in the OCMJEA forum. We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara 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.