Advanced Features in Java: Using Generic Type Parameters
Java
| Expert
- 12 videos | 1h 33m 16s
- Includes Assessment
- Earns a Badge
In this course, you'll learn how type parameters can be used to combine type safety and code re-use. You'll see how type parameters can be specified for either for classes or for individual methods of classes. You'll learn that while instantiating objects of those classes, or while invoking those methods, you can pencil in type arguments in place of those type parameters. You'll cover defining type parameters, using classes and methods with type parameters, as well as conventions and rules that apply to such parameters. You'll then explore the raw type that lies beneath any class or method with a type parameter. Java creates just one single copy of such code, and pencils in a type parameter of java.lang.Object. Java also adds various type checks to ensure that the code is used correctly - this is known as type erasure, and forms the basis of the great performance of Java generics. Finally, you'll move on to the use of constraints on type parameters and see how these are achieved using Bounded Type Parameters. Using bounds, it is possible to exercise fine-grained control over the ensure that the type argument - for instance to specify that it must be a numeric type.
WHAT YOU WILL LEARN
-
Discover the key concepts covered in this courseRecognize how using type parameters can ensure both type safety and code reuseRecognize different aspects of specifying and using type parametersDescribe the raw type underlying a generic type, and how if no type parameter is specified, java makes the object of type java.lang.object the type parameterRecognize that the names of type parameters don’t matter so long as certain variable naming rules are not violatedIterate over objects that have multiple type parameters
-
Recognize how type parameters can be applied not only to classes, but also to specific methods inside classesDescribe the use of type parameters within functionsDescribe the use of more than one type parameterIncorporate constraints, known as bounds, on type parametersDifferentiate between bounded and unbounded type parametersSummarize the key concepts covered in this course
IN THIS COURSE
-
2m 37s
-
10m 49sUpon completion of this video, you will be able to recognize how using type parameters can ensure type safety and code reuse. FREE ACCESS
-
6m 13sAfter completing this video, you will be able to recognize different aspects of specifying and using type parameters. FREE ACCESS
-
10m 19sAfter completing this video, you will be able to describe the raw type underlying a generic type, and how if no type parameter is specified, Java makes the object of type java.lang.Object the type parameter. FREE ACCESS
-
8m 11sUpon completion of this video, you will be able to recognize that the names of type parameters don't matter so long as certain variable naming rules are not violated. FREE ACCESS
-
6m 12sFind out how to iterate over objects that have multiple type parameters. FREE ACCESS
-
10m 41sAfter completing this video, you will be able to recognize how type parameters can be applied not only to classes, but also to specific methods inside of classes. FREE ACCESS
-
9m 19sAfter completing this video, you will be able to describe the use of type parameters within functions. FREE ACCESS
-
7m 14sUpon completion of this video, you will be able to describe the use of more than one type parameter. FREE ACCESS
-
11m 17sIn this video, find out how to incorporate constraints, known as bounds, on type parameters. FREE ACCESS
-
8m 12sLearn how to differentiate between bounded and unbounded type parameters. FREE ACCESS
-
2m 12s
EARN A DIGITAL BADGE WHEN YOU COMPLETE THIS COURSE
Skillsoft is providing you the opportunity to earn a digital badge upon successful completion on some of our courses, which can be shared on any social network or business platform.
Digital badges are yours to keep, forever.