Java™ for Programmers: Deitel
by Paul J. Deitel - Deitel & Associates, Inc., Harvey M. Deitel - Deitel & Associates, Inc.
15. Generics
Objectives
In this chapter you’ll learn:
• To create generic methods that perform identical tasks on arguments of different types.
• To create a generic Stack class that can be used to store objects of any class or interface type.
• To understand how to overload generic methods with non-generic methods or with other generic methods.
• To understand raw types and how they help achieve backward compatibility.
• To use wildcards when precise type information about a parameter is not required in the method body.
• The relationship between generics and inheritance.
Every man of genius sees the world at a different angle from his fellows.
—Havelock Ellis
...our special individuality, as distinguished from our generic humanity.
—Oliver ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access