Objectives |
|
Generics is the capability to parameterize types. You can declare a generic type in a class, interface, or method and specify a concrete type when using the class, interface, or method.
This chapter introduces how to declare and use generic classes, interfaces, and methods, and demonstrates how generics can be used to improve software reliability and readability. This chapter can be intertwined with Chapter 10, "Abstract Classes and Interfaces."