Chapter 14Generics and Collections

THE OCP EXAM TOPICS COVERED IN THIS CHAPTER INCLUDE THE FOLLOWING:

  • Generics and Collections
    • Use wrapper classes, autoboxing and autounboxing
    • Create and use generic classes, methods with diamond notation and wildcards
    • Describe the Collections Framework and use key collection interfaces
    • Use Comparator and Comparable interfaces
    • Create and use convenience methods for collections
  • Java Stream API
    • Use lambda expressions and method references

You learned the basics of the Java Collections Framework in Chapter 5, “Core Java APIs,” along with generics and the basics of sorting. We will review these topics while diving into them more deeply.

First, we will cover how to use method references. After a review ...

Get OCP Oracle Certified Professional Java SE 11 Developer Complete Study Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.