are a built-in language feature that will make your
software more reliable. This lesson discusses the following topics:
This section explains some common shortcomings associated with non-generic code.
Specifically, it shows how certain kinds of bugs will crash an application at runtime, since they are not detectable by the compiler.
This section explains generic type declarations, type variables, type parameters, and type arguments. It also describes the naming conventions that are specific to generics.
This section shows how type parameters can be used to define generic methods and constructors.
This section describes type inference, which enables you to invoke a generic method as you would an ordinary method, without specifying a type between angle brackets.
This section describes how type parameters can specify an upper bound that limits the kind of types that can be passed in.
This section describes how generic subtyping differs from non-generic subtyping.
This section continues the discussion of subtyping by describing bounded and unbounded wildcards.
This section describes type erasure, raw types, and unchecked warnings.
This section describes the consequences type erasure has that are related to variable arguments (also known as varargs) methods that use generic types as parameters.