May 2018
Intermediate to advanced
928 pages
25h 27m
English
In this chapter
Generic classes and methods have type parameters. This allows them to describe precisely what should happen when they are instantiated with specific types. Prior to generic classes, programmers had to use the Object for writing code that works with multiple types. This was both cumbersome and unsafe.
With the introduction of generics, Java has an expressive type system that allows designers to describe in detail how types of ...