Advanced Features in Java: Working with Sets In Java

Java    |    Expert
  • 11 videos | 1h 22m 27s
  • Includes Assessment
  • Earns a Badge
Rating 4.2 of 37 users Rating 4.2 of 37 users (37)
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

  • 2m 30s
  • 9m 33s
    In this video, you will create a HashSet object and invoke multiple methods on it. You will also correctly override the .hashCode and .equals method of the contained class. FREE ACCESS
  • Locked
    3.  HashSets and Duplicates
    7m 1s
    After completing this video, you will be able to describe how the HashSet behaves with duplicates and how overridden versions of the .equals and .hashCode methods influence this behavior. FREE ACCESS
  • Locked
    4.  Different Types of Sets
    10m 19s
    Upon completion of this video, you will be able to recognize the different types of sets and how they all extend the Set, Collection, and Iterable interfaces. FREE ACCESS
  • Locked
    5.  Properties of Sets
    9m 11s
    Find out how to differentiate between methods used to compute set union, difference, intersection, and equality operations. FREE ACCESS
  • Locked
    6.  Iteration over Sets
    8m 20s
    Learn how to analyze the performance characteristics of LinkedHashSets, TreeSets, and HashSets. FREE ACCESS
  • Locked
    7.  Using EnumSets
    6m 35s
    Upon completion of this video, you will be able to recognize how and why EnumSets should be used to represent categorical data. FREE ACCESS
  • Locked
    8.  Order of Set Elements
    7m 22s
    After completing this video, you will be able to describe how different implementations of the Set interface differ in their notions of set order. FREE ACCESS
  • Locked
    9.  TreeSets and Comparators
    9m 29s
    Find out how to create a TreeSet and sort it using various custom comparators. FREE ACCESS
  • Locked
    10.  TreeSets, Custom Objects, and Custom Comparators
    9m 56s
    During this video, you will learn how to create a TreeSet that stores custom objects without creating a custom comparator. FREE ACCESS
  • 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 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

PEOPLE WHO VIEWED THIS ALSO VIEWED THESE

Rating 4.4 of 50 users Rating 4.4 of 50 users (50)
Rating 4.6 of 68 users Rating 4.6 of 68 users (68)
Rating 4.5 of 294 users Rating 4.5 of 294 users (294)