Java Closures and Lambda

  • Authors
  • Robert Fischer

Table of contents

  1. Front Matter
    Pages i-xvii
  2. Robert Fischer
    Pages 1-10
  3. Robert Fischer
    Pages 11-32
  4. Robert Fischer
    Pages 51-69
  5. Robert Fischer
    Pages 71-93
  6. Robert Fischer
    Pages 95-110
  7. Robert Fischer
    Pages 111-137
  8. Robert Fischer
    Pages 139-152
  9. Robert Fischer
    Pages 153-193
  10. Back Matter
    Pages 195-198

About this book

Introduction

Java Closures and Lambda introduces you to significant new changes to the Java language coming out of what is termed Project Lambda. These new changes make their debut in Java 8, and their highlight is the long-awaited support for lambda expressions in the Java language. You’ll learn to write lambda expressions and use them to create functional interfaces and default methods for evolving APIs, among many other uses.

The changes in Java 8 are significant. Syntax and usage of the language are changed considerably with the introduction of closures and lambda expressions. This book takes you through these important changes from introduction to mastery. Through a set of clear examples, you’ll learn to refactor existing code to take advantage of the new language features. You’ll learn what those features can do for you, and when they are best applied. You’ll learn to design and write new code having these important new features in mind from the very beginning.

  • Clearly explains the fantastic benefits resulting from Project Lambda
  • Explains the syntax and IDE support for the new features
  • Shows how to streamline your code by bringing some of the benefits of functional programming to the Java language
  • Illustrates parallelism in closures through Stream and Spliterator objects
  • Explains API evolution by adding methods to existing interfaces without breaking existing interface implementations, a technique addressing potential multiple inheritance issues

Bibliographic information

Industry Sectors
Pharma
Automotive
Electronics
Telecommunications
Aerospace