
This course includes our updated coding exercises so you can practice your skills as you learn.
See a demo
Explore Java generics through a practical, coding-focused approach that covers generic types, classes, interfaces, and collections with generics, and methods, including wild cards, type parameters, raw types, and type erasure.
Discover how Java generics provide compile-time type checks, avoid runtime class cast errors, and enable code reuse by turning a data class into a generic class with a type parameter.
Learn to create a generic interface in Java, define a data interface with type t, implement getter and setter, and instantiate with a concrete class using to-string output.
Explore how generic interfaces and classes extend each other using the same type parameters. Learn rules for non-generic versus generic types, and why mismatched parameters trigger compile-time errors.
Learn how generics enforce compile-time type checks, eliminate casts, and boost code reuse in Java collections, with a practical demo using ArrayList and the diamond operator.
Learn how raw types represent generic classes without type arguments, see how using raw types with collections like ArrayList can bypass type safety, and why generics warnings persist for compatibility.
Explains multiple type parameters with hash map of integer keys and string values, and shows a generic bin class with dry and wet trash type parameters and getters and setters.
Explore subtyping in java generics, showing that ArrayList<Integer> is a subtype of List<Integer> but not List<Number>, and that subtyping relies on matching type arguments.
Learn to create generic methods (and even generic constructors) in non-generic classes, applying type parameters to a single method rather than the whole class, and calling with diverse data types.
Bound type parameters to restrict generics, demonstrated via a data sorter that sorts numeric lists and supports generic methods with interface bounds; note Java cannot bound with multiple classes.
Explore upper bounded wild cards in Java generics using the question mark to represent unknown types, and compare them with type parameters, including extends number bounds in data node examples.
Learn how lower bounded wildcards use ? super to accept a type or its super types in a list passed to a display data method.
Explore the restrictions of wildcards in generics, including header limits on reference type declarations, no multiple bounds, and read-only versus write restrictions for unbounded, upper bounded, and lower bounded wildcards.
Examine how generics and raw types interact in java collections, showing that a generic string list enforces type safety while a raw type behaves like a non-generic object.
Java's type erasure replaces generic type parameters with their bounds or object, inserts casts, and erases type information at runtime, affecting raw types and overloads.
Explore Java generics concepts, including generic types, classes, interfaces, methods, bounded and lower bounded wildcards, type safety, raw types, subtyping, and type erasure.
Java Generics UnComplicated is a completely practical course starts with coding and end with coding.
To help you to make your concepts crystal clear we have also included quizzes and coding exercises.
In this course we have tried to make this topics UnComplicated for you.
I will recommend to please be ready with your laptop or Desktop to code along with me.
The topics that we will cover in this course are
Making you familiar to generics with help of Coding
Generic Type - Generic classes and Generic-Interface
Excerrcising-Subclassing
Collection with generics
Raw-Type
Multiple Type Parameter
Sub-Typing
Generic-Methods
Bounded Type Parameter
Wildcards, Upper Bounded WildCards
Lower Bounded Wildcard
Type erasure
I have also ... put some practice Questions as you make progress and i also recommend not to skip those questions...
Last but not least there are couple of Home Work coding exercises.Try solving them before you look for the solution attached.
By the end of this course you will not only become familiar with Generics but also, you will be ready to apply Generics in real life.
The course comes with 100% Money back Gurantee so please feel free to ask for the refund if you don't like the course.
Happy Learning
Basics>Strong;