Course info
Aug 10, 2015
3h 53m

Java’s powerful generics has been available to developers for ten years now and is extensively used throughout both core and third party libraries. Unfortunately, it's not as well understood as it could be. This course is here to help. We’ll both shine a light on the common use cases of generics on classes, methods, or interfaces and also peer into some of the darker corners such as type bounds and wildcards.

About the author
About the author

Software Engineer, Trainer, Author and Conference Speaker, interested in deep dive performance issues, PhD, Londoner.

More from the author
Java: JSON Fundamentals
2h 29m
Jul 30, 2018
Java Interfaces and Abstraction
1h 58m
Sep 1, 2017
Understanding and Solving Java Memory Problems
2h 40m
Mar 28, 2017
More courses by Richard Warburton
Section Introduction Transcripts
Section Introduction Transcripts

Hi, Richard Warburton here. This module, module number five, is about wildcards. Now, as we briefly mentioned towards the end of the previous module, wildcards are used extensively throughout the Java core libraries. In fact, wildcards are wherever you see one of those question marks inside your generics. If you ever see a generic type parameter and you see a question mark, that's a wildcard. In this module, we're going to explain what they are, how you might use them, what the different types of wildcard are, and why you might use them. Really, wildcards aren't just one feature in and of themselves. It's a name given to a collection of different capabilities that we have with generics. It's all to do with bounds. Wildcards can be bounded or they can be unbounded. What a bounded wildcard is, is it's where you see something with list question mark extends class name, or list of question mark super class name, and those are upper and lower bounded wildcards. If you just say something like list of question mark or class of question mark, that's an unbounded wildcard. We're gonna have a look through in this module, and we're gonna cover all three different types of wildcards and we're gonna say what they can be used for as well.