Chapter 8 - Java for Beginners Course

Introduction

In the next 2 chapters we’ll start covering some more advanced topics related to classes and functional programming, some of them introduced in Java 8.

In this chapter in particular we’ll introduce the following concepts:

  • Anonymous classes

  • Lambdas

  • Built-in functional interfaces

  • Method References

To help clarify these concepts we’ll be using an example about filtering data in a collection of objects. We’ll start working with a List<Integer> and we’ll want to filter the data in different ways.

This example is used only to introduce the concepts mentioned above and tie into some of the built-in interfaces provided in Java 8.