Advanced Features in Java: Working with Sets In Java

Java SE 13    |    Expert
  • 11 Videos | 1h 26m 57s
  • Includes Assessment
  • Earns a Badge
Likes 11 Likes 11
In this course, you'll explore the Set interface and the different Set collections available in Java. You'll learn how the Java Set interface extends Collection, and how it is used to define unordered collections in which duplicates are not allowed. You'll discover common set operations such as union, difference, intersection, and equality, as well as how these are influenced heavily by the implementation of .equals and .hashCode in the objects contained within the set. You'll cover four implementations of the Set interface - HashSet, LinkedHashSet, EnumSet, and TreeSet. Finally, you'll learn the correct implementations of the .hashCode, .equals, and .compareTo methods of user-defined objects that are to be stored in Sets.

WHAT YOU WILL LEARN

  • discover the key concepts covered in this course
    create a HashSet object and invoke multiple methods on it, and also correctly override the .hashCode and .equals method of the contained class
    describe how the HashSet behaves with duplicates and how overridden versions of the .equals and the .hashCode methods influence this behavior
    recognize the different types of sets and how they all extend the Set, Collection, and Iterable interfaces
    differentiate between methods used to compute set union, difference, intersection, and equality operations
    analyze the performance characteristics of LinkedHashSets, TreeSets, and HashSets
  • recognize how and why EnumSets should be used to represent categorical data
    describe how different implementations of the Set interface differ in their notions of set order
    create a TreeSet and sort it using various custom comparators
    create a TreeSet that stores custom objects without also creating a custom comparator
    summarize the key concepts covered in this course

IN THIS COURSE

  • Playable
    1. 
    Course Overview
    2m 30s
    UP NEXT
  • Playable
    2. 
    Introduction to HashSets
    9m 33s
  • Locked
    3. 
    HashSets and Duplicates
    7m 1s
  • Locked
    4. 
    Different Types of Sets
    10m 19s
  • Locked
    5. 
    Properties of Sets
    9m 11s
  • Locked
    6. 
    Iteration over Sets
    8m 20s
  • Locked
    7. 
    Using EnumSets
    6m 35s
  • Locked
    8. 
    Order of Set Elements
    7m 22s
  • Locked
    9. 
    TreeSets and Comparators
    9m 29s
  • Locked
    10. 
    TreeSets, Custom Objects, and Custom Comparators
    9m 56s
  • Locked
    11. 
    Course Summary
    2m 13s

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.