Java: Generic Classes

Java: Generic Classes

2h 38mIntermediate2022-02-10

Authors

Ketkee Aryamane

Ketkee Aryamane

Software Professional

Course details

Generics in Java are popular and widely used in all kinds of project development—Core Java projects, web application projects, web services, and more. It’s an indispensable capability in the Java language and provides the power of eliminating errors at compile time itself instead of resulting in runtime problems. In this course, Ketkee Aryamane goes hands-on with generics in Java. She starts with the fundamental concepts, terms, and rules and naming conventions in generics, then covers generic classes and methods. Ketkee then takes a deeper dive into generics, covering topics like generic class hierarchies, wildcard arguments, and restrictions on generics. If you’re a developer looking to save time by eliminating runtime issues and making more readable code, join Ketkee in this course.

Skills covered

JavaProgramming FoundationsOracleProgramming LanguagesSoftware DevelopmentDeep Dive (X:Y)

Concepts

Introduction

  • Generics in Java
  • Prerequisites for this course

Fundamentals of Generics

  • Understand the need for generics
  • Understand generics in Java
  • Terms in generics
  • Rules and naming conventions
  • Advantages of generics

Generic Classes and Methods

  • Generic classes interface use case
  • Create a generic class demo
  • Understand generic methods and constructors
  • Implement a generic method as a utility
  • Using bounded types
  • Challenge - Write code using generic classes bounded types
  • Solution - Write code using generic classes bounded types

Generics - Deep Dive

  • Generic class hierarchies
  • Type argument hierarchies
  • Understand type erasure in generics
  • Understand bridge methods
  • Understand type inference and target types
  • Applying wildcard arguments
  • Restrictions on generics

Conclusion

  • Where to go from here
80,000 Toman