20 Generics

Objectives

In this chapter you’ll:

  • Create generic methods that perform identical tasks on arguments of different types.

  • Create a generic Stack class that can be used to store objects of a specific type.

  • Understand how to overload generic methods with nongeneric methods or with other generic methods.

  • Understand the kinds of constraints that can be applied to a type parameter.

  • Apply multiple constraints to a type parameter.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset