February 2014
Beginner
1248 pages
62h 25m
English
This chapter introduced generics. You learned how to declare generic methods and classes with type parameters specified in type-parameter sections. You also learned how to specify the upper bound for a type parameter and how the Java compiler uses erasure and casts to support multiple types with generic methods and classes. We discussed how backward compatibility is achieved via raw types. You also learned how to use wildcards in a generic method or a generic class.
In Chapter 21, you’ll learn how to implement your own custom dynamic data structures that can grow or shrink at execution time. In particular, you’ll implement these data structures using the generics capabilities you learned in this chapter.
Read now
Unlock full access