Advanced Features in Java: Using Generic Type Parameters

Java    |    Expert
  • 12 videos | 1h 33m 16s
  • Includes Assessment
  • Earns a Badge
Rating 4.8 of 13 users Rating 4.8 of 13 users (13)
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

  • 2m 37s
  • 10m 49s
    Upon completion of this video, you will be able to recognize how using type parameters can ensure type safety and code reuse. FREE ACCESS
  • Locked
    3.  Experimentation with Type Parameters
    6m 13s
    After completing this video, you will be able to recognize different aspects of specifying and using type parameters. FREE ACCESS
  • Locked
    4.  The Underlying Raw Type
    10m 19s
    After 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
  • Locked
    5.  Naming Conventions with Type Parameters
    8m 11s
    Upon 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
  • Locked
    6.  Invoking Functions with Multiple Type Parameters
    6m 12s
    Find out how to iterate over objects that have multiple type parameters. FREE ACCESS
  • Locked
    7.  Type Parameters in Individual methods
    10m 41s
    After 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
  • Locked
    8.  Different Aspects of Type Parameters in Functions
    9m 19s
    After completing this video, you will be able to describe the use of type parameters within functions. FREE ACCESS
  • Locked
    9.  Defining Methods with Multiple Type Parameters
    7m 14s
    Upon completion of this video, you will be able to describe the use of more than one type parameter. FREE ACCESS
  • Locked
    10.  Introduction to Bounded Type Parameters
    11m 17s
    In this video, find out how to incorporate constraints, known as bounds, on type parameters. FREE ACCESS
  • Locked
    11.  Bounded Type Parameters as Usage Constraints
    8m 12s
    Learn how to differentiate between bounded and unbounded type parameters. FREE ACCESS
  • 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 on some of our courses, which can be shared on any social network or business platform.

Digital badges are yours to keep, forever.

YOU MIGHT ALSO LIKE

Rating 4.5 of 84 users Rating 4.5 of 84 users (84)
Rating 4.7 of 84 users Rating 4.7 of 84 users (84)
Rating 4.5 of 36 users Rating 4.5 of 36 users (36)

PEOPLE WHO VIEWED THIS ALSO VIEWED THESE

Rating 4.9 of 8 users Rating 4.9 of 8 users (8)
Rating 4.8 of 4 users Rating 4.8 of 4 users (4)
Rating 4.5 of 100 users Rating 4.5 of 100 users (100)