Udemy

A Guide to Understand Java Generics with Examples

Enroll Now
  • 11,532 Students
  • Updated 2/2021
4.5
(62 Ratings)
CTgoodjobs selects quality courses to enhance professionals' competitiveness. By purchasing courses through links on our site, we may receive an affiliate commission.

Course Information

Registration period
Year-round Recruitment
Course Level
Study Mode
Duration
2 Hour(s) 53 Minute(s)
Language
English
Taught by
Arun Ammasai
Rating
4.5
(62 Ratings)

Course Overview

A Guide to Understand Java Generics with Examples

With Simple Examples Step by Step

Java Generics

Java Generic methods and generic classes enable programmers to specify, with a single method declaration, a set of related methods, or with a single class declaration, a set of related types, respectively. Generics also provide compile-time type safety that allows programmers to catch invalid types at compile time. This reference will take you through simple and practical methods using Java Generics.

The Java Generics programming is introduced in J2SE 5 to deal with type-safe objects. It makes the code stable by detecting the bugs at compile time.

Before generics, we can store any type of objects in the collection, i.e., non-generic. Now generics force the java programmer to store a specific type of objects.

It would be nice if we could write a single sort method that could sort the elements in an Integer array, a String array, or an array of any type that supports ordering.

Java Generic methods and generic classes enable programmers to specify, with a single method declaration, a set of related methods, or with a single class declaration, a set of related types, respectively.

Generics also provide compile-time type safety that allows programmers to catch invalid types at compile time.

Using Java Generic concept, we might write a generic method for sorting an array of objects, then invoke the generic method with Integer arrays, Double arrays, String arrays and so on, to sort the array elements.

Course Content

  • 5 section(s)
  • 31 lecture(s)
  • Section 1 Introduction
  • Section 2 Java Generics Concepts
  • Section 3 Java Generic Bounds
  • Section 4 Type Erasure in Generics
  • Section 5 Thanks

What You’ll Learn

  • Guide to Understand Generics with Examples

Skills covered in this course


Reviews

  • R
    Richard Sobota
    4.0

    Good introduction to generics. I'm giving four stars because of few mistakes in examples in videos. IMHO, it would be better to try and test examples before recording.

  • A
    Arnold Kalema
    5.0

    Great training, I highly appreciate and recommend this course.

  • A
    Alok Sachan
    5.0

    Great course for beginners

  • D
    Donny Lobree
    5.0

    Patient, thorough and complete coverage of generics. This is an excellent supplement to anyone's study of Generics. I was stuck in my college course when this subject was covered, but now I'm unstuck. Thank you!

Start FollowingSee all

We use cookies to enhance your experience on our website. Please read and confirm your agreement to our Privacy Policy and Terms and Conditions before continue to browse our website.

Read and Agreed