Java Collections And Generics

Move your Java skills to the next level by mastering Java Collections Framework and Generics
2.5 (5 ratings)
Instead of using a simple lifetime average, Udemy calculates a
course's star rating by considering a number of different factors
such as the number of ratings, the age of ratings, and the
likelihood of fraudulent ratings.
70 students enrolled
50% off
Take This Course
  • Lectures 48
  • Length 2 hours
  • Skill Level Intermediate Level
  • Languages English
  • Includes Lifetime access
    30 day money back guarantee!
    Available on iOS and Android
    Certificate of Completion
Wishlisted Wishlist

How taking a course works


Find online courses made by experts from around the world.


Take your courses with you and learn anywhere, anytime.


Learn and practice real-world skills and achieve your goals.

About This Course

Published 3/2015 English

Course Description

So, you have learned some basic Java skills and know how to implement Object Oriented concepts in Java? Now, what to learn next?

It's time to move your Java skills to the next level by mastering the Java Collections Framework and Generics.

If you are planning to work with Java platforms at any levels, these topics are must-known skills that you need a long the way with your programming career.

In this course, I will not just give you a list of the most popular Java collections, but you will also be able to distinguish the differences among those kinds of collections and know when to use for what for your programming jobs.

The concept of hash code collections using hashing algorithm such as HashSet and HashMap is also clearly explained with pictures as well as implementation.

For Generics section, you will not be limited at applying generics on collections like you might have encountered in other courses. In this course, you will learn from the basic of how to make classes and methods to be generic, to advanced techniques such as bounded type parameters, generics with inheritance, wildcards, rawtypes, and so on. And to help learners have a clear and comprehensive picture of generics, some behind-the-scene topics will be presented, including: autoboxing, unboxing, type erasure, and generic restrictions.

The course comes with 2 quizzes, one for each section with many questions designed to help you remember and have a more understanding of the new concepts in the lectures. Questions in the 2 quizzes cover all the topics who have come across in the course.

After complete all lectures, solidify your collections and generics skills with mini exercises. The solutions for each exercise is also attached.

Finally, challenge your programming skills with the big exercise.

The complete source code for the big exercise is also provided but I would highly recommend you should try to complete yourself first before taking a look at the provided solution.

What are the requirements?

  • Students who take this course should have a basic skills in Java language including OOP concepts
  • The course code projects in the course are created on Netbeans 8, running on JDK 8.

What am I going to get from this course?

  • 2 quizzes with 39 questions
  • 16 mini exercises to practice with provided solutions
  • 1 project to practice with provided source code solution
  • Apply different types of collections in daily programming tasks
  • Distinguish the differences among collections and how they are different from the underlying
  • Cope with different issues related to collections: sorting object list, overriding equals() and hashCode() methods
  • Apply generics on differrent kinds of collections
  • Apply generics on Classes and methods
  • Master the bounded type parameter techniques
  • Master other generic concepts: autoboxing, unboxing, type erasure, rawtypes

Who is the target audience?

  • Students who have learned basic Java skills and want to advance their knowlege
  • Students who have learned collections and generics but want to revise their knowledge with updated skills
  • Students who want to take Java-related exams or certifications
  • Students who want to catch up the better and comprehensive knowledge of Collections Framework and Generics

What you get with this course?

Not for you? No problem.
30 day money back guarantee.

Forever yours.
Lifetime access.

Learn on the go.
Desktop, iOS and Android.

Get rewarded.
Certificate of completion.


Section 1: Collections Framework

An brief introduction about Java Collections Framework will be given to show you what benefits you could get over traditional arrays. A hierarchical collections interfaces will also be presented so that you can have an overview of the Collections Framework in Java


You will learn how to use the List interface with the 2 implementations: ArrayList and Vector. The difference between these 2 classes will also be introduced.


The Set interface with the 3 implementation will be discussed. You will also learn when to use the HashSet, LinkedHashSet, and the TreeSet.


I will discuss the Map interface which is one of the most popular data structures in computer systems. Also, its implementations of HashMap, LinkedHashMap, and TreeMap will be presented


We will explore the Collections class to have supported algorithms so that you can save a lot of time and effort when working with collections


How to sort a collection of Objects with the Comparable interface will be discussed in this lecture.


We'll talk about a more flexible way of sorting a collection of Objects with the Comparator interface


We'll see how a queue works and its common implementation: the LinkedList class


We'll explore a special queue implementation: the PriorityQueu class so that you can prioritized elements in a queue data structure


We'll explore a special Queue data structure: Deque Interface, which is short for Double Ended Queue. We'll also gain the difference between the 2 implementations: LinkedList and ArrayDeque


Sometimes, we want to prevent our collections to be accidentally modified by making them unmodifiable. You'll learn how easy it is to achieve that in this lecture.


One of the most confused points when it comes to overriding the equals() and hashCode() methods is why and when the 2 methods should be come together. This lecture will clear such confusion by illustrating the hash code concepts.

Test Your Collections Skills With Questions
19 questions
Section 2: Generic Fundamentals

This lecture will give a brief introduction about generics and what benefits it can bring to our programs.


We'll see how we can avoid duplicate code by applying generics on methods


Applying generics on classes is one of the fundamentals in generic code. We'll see how easy it is to achieve that.


It is hard to master your generic skills without knowing how to restrict types on generics. We can get it done by using the bounded type parameter technique


We'll continue to go further with the bounded type parameters of the support of a list of bounded types.


We'll learn how to have a multiple bounds when we have multiple parameterized types in generics code


We'll discuss what points we need to pay attention to when working with generics and inheritance. This is also a common and confused point when it comes to generics and inheritance


We'll learn how to apply generics on List collections to avoid run time exceptions


As with the List collections, we'll explore how to use generics for Set and the Iterator interface


Generics and Map with the Iterator interface will be presented


We'll discuss about the Type Inference concepts and a new term in Java 7: the diamond symbol


The advanced concept of wildcards and its related term: upper bounded wildcards will be clear in this lecture.


Keep equipping your wildcards techniques with the Lower bounded wildcard skills.


This lecture will clear the confusion when wildcards and inheritance come along with each other; and a new term will be introduced: PECS


In lecture will introduce the Raw type concept and how it affects your generics code

Section 3: Generics: Behind The Scene

The concepts of autoboxing and unboxing will be discussed to help you gain a more understanding when writing generic code.

A list of wrapper classes will also be presented


One of the fundamental concepts using in generics will be introduced: type erasure


You'll learn some of the important restrictions when utilizing generics in your code.

Also, I'll introduce an advanced technique in Java called: Reflection to have supported operations in generics code.

Test Your Generics Skills With Questions
20 questions
Section 4: Test Your Collection Skills With Exercises
Exercise 1
Exercise 2
Exercise 3
Exercise 4
Exercise 5
Exercise 6
Exercise 7
Exercise 8
Exercise 9
Section 5: Test Your Generics Skills With Exercises
Exercise 1
Exercise 2
Exercise 3
Exercise 4
Exercise 5
Exercise 6
Exercise 7
Section 6: Challenging Project

Read the requirement and try to work on it yourself before coming to the provided solution

Project Source Code Solution

Students Who Viewed This Course Also Viewed

  • Loading
  • Loading
  • Loading

Instructor Biography

Sera Nguyen, Developer, Architect, Professor

Hi, my is Sera Nguyen and I have a big interest in Software Programming. After completing my Computer Science degree, I was employed as Embedded Software Engineer at Renesas Corporation, then Software Architect at CSC Corporation. After more than 6 years in the Software Industry and completing my Master degree, I became a full time University Professor specializing in Software Engineering Faculty. Currently, I am still working full time as Professor and contracting trainer for software companies and doing research for my PhD degree in software architecture design field.

Ready to start learning?
Take This Course