Generics in the Java Programming Language
You maybe familiar with similar constructs from other languages, most notably C++templates. If so, you'llsoon see that there are both similarities and important differences. If you are not familiar with look-a-alike constructs from elsewhere, all the better; you can start afresh, without unlearning any misconceptions. Generics allow ...
JDK1.5 introduces several extensions to the Java programming language. One of these is the introduction of generics . This tutorial is aimed at introducing you to generics. You maybe familiar with similar constructs from other languages, most notably C++templates. If so, you'llsoon see that there are both similarities and important differences. If you are not familiar with look-a-alike constructs from elsewhere, all the better; you can start afresh, without unlearning any misconceptions.
Defining Simple Generics 3 3 Generics and Subtyping 4 4 Wildcards 5 41 BoundedWildcards 6 5 Generic Methods 7 6 Interoperating with Legacy Code 10 61 UsingLegacy Code in Generic Code 10 62 Erasureand Translation 12 63 UsingGeneric Codein Legacy Code 13 7 The FinePrint 14 71 AGenericClassis Shared by all its Invocations 14 72 CastsandInstanceOf 14 73 Arrays 15 8 Class Literals as Run-time Type Tokens 16 9 More FunwithWildcards 18 91 WildcardCapture 20 10 Converting Legacy Code to Use Generics...
Source: java.sun.com
Related PDF Files
Topic:
Comments for Generics in the Java Programming Language