Advanced Features in Java: Using Generic Type Parameters

Java SE 13
  • 12 Videos | 1h 38m 16s
  • Includes Assessment
  • Earns a Badge
Likes 9 Likes 9
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 course
    recognize how using type parameters can ensure both type safety and code reuse
    recognize different aspects of specifying and using type parameters
    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
    recognize that the names of type parameters don’t matter so long as certain variable naming rules are not violated
    iterate over objects that have multiple type parameters
  • recognize how type parameters can be applied not only to classes, but also to specific methods inside classes
    describe the use of type parameters within functions
    describe the use of more than one type parameter
    incorporate constraints, known as bounds, on type parameters
    differentiate between bounded and unbounded type parameters
    summarize the key concepts covered in this course

IN THIS COURSE

  • Playable
    1. 
    Course Overview
    2m 37s
    UP NEXT
  • Playable
    2. 
    Introduction to Type Parameters
    10m 49s
  • Locked
    3. 
    Experimentation with Type Parameters
    6m 13s
  • Locked
    4. 
    The Underlying Raw Type
    10m 19s
  • Locked
    5. 
    Naming Conventions with Type Parameters
    8m 11s
  • Locked
    6. 
    Invoking Functions with Multiple Type Parameters
    6m 12s
  • Locked
    7. 
    Type Parameters in Individual methods
    10m 41s
  • Locked
    8. 
    Different Aspects of Type Parameters in Functions
    9m 19s
  • Locked
    9. 
    Defining Methods with Multiple Type Parameters
    7m 14s
  • Locked
    10. 
    Introduction to Bounded Type Parameters
    11m 17s
  • Locked
    11. 
    Bounded Type Parameters as Usage Constraints
    8m 12s
  • Locked
    12. 
    Course Summary
    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 of this course, which can be shared on any social network or business platform

Digital badges are yours to keep, forever.

YOU MIGHT ALSO LIKE