CHAPTER 4

image

Generics and Collections

Certification Objectives

Create and use a generic class

Create and use ArrayList, TreeSet, TreeMap, and ArrayDeque objects

Use java.util.Comparator and java.lang.Comparable interfaces

Collections Streams and Filters

Iterate using forEach methods of Streams and List

Describe Stream interface and Stream pipeline

Filter a collection by using lambda expressions

Use method references with Streams

Every non-trivial Java application makes use of data structures and algorithms. The Java collection’s framework provides a large set of readily usable general-purpose data structures and algorithms. These data structures ...

Get Oracle Certified Professional Java SE 8 Programmer Exam 1Z0-809: A Comprehensive OCPJP 8 Certification 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.