|
This course introduces you to the generics feature that was added to Java with the Java 2 5.0 release. It demonstrates how to create generic classes, interfaces, and methods in which the type of data on which they operate is specified as a parameter.
Objectives:
After completing this course, students will be able to:
- Describe the role of generics in Java programming
- Create generic classes, interfaces, and methods
- Use the generic wildcard argument to represent unknown types
- Use raw types to make legacy code compatible with generic code
- Explain how the Java compiler uses erasure to implement generics
- List the restrictions to using generics in Java
Topics:
- Generics fundamentals
- Objects and type arguments
- Bounded types
- Wildcard arguments
- Bounded wildcards
- Generic methods
- Generic constructors
- Generic interfaces
- Raw types and legacy code
- Erasure and ambiguity errors
- Generic restrictions
|