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 O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.