My Account Log in

2 options

Learning Java Lambdas : an in-depth look at one of the most important features of modern Java / Toby Weston.

Ebook Central College Complete Available online

View online

O'Reilly Online Learning: Academic/Public Library Edition Available online

View online
Format:
Book
Author/Creator:
Weston, Toby, author.
Language:
English
Subjects (All):
Functional programming (Computer science).
Functions--Computer programs.
Functions.
Java (Computer program language).
Physical Description:
1 online resource (100 pages)
Edition:
1st edition
Place of Publication:
Birmingham, England : Packt Publishing, 2017.
System Details:
text file
Biography/History:
Weston Toby: Toby Weston - Independent Software DeveloperI specialise in modern software development; functional and object-oriented programming, agile and lean best practice. I wrote the book Essential Acceptance Testing and have written for magazines as well as regularly blogging. I've been part of the software industry for more than fifteen years and love what I do. I love talking and writing about it and sharing my experiences online with Udemy.
Summary:
Understand and utilize Java Lambdas About This Book Take a deep dive into one of the single most important additions to modern Java Master Java lambdas, and fully understand functions, classes, and scope. Improve your programming skills, which will enable you to write cleaner and more dynamic code Who This Book Is For Learning Java Lambdas is for developers looking to upgrade their Java skills and familiarize themselves with one of the most important new features of Java. This book is not for absolute beginners and will be more suited to professionals who are already comfortable with Java coding. You should have a basic knowledge of Java before reading this book. What You Will Learn What a lambda is and how it differs from other Java features How to use lambdas effectively in your own projects The use of method references and advanced scoping The difference between lambdas and closures The differences in bytecode produced when using lambdas In Detail In this short book, we take an in-depth look at lambdas in Java, and their supporting features. The book covers essential topics, such as functional interfaces and type inference, and the key differences between lambdas and closures. You will learn about the background to functional programming and lambdas, before moving on to understanding the basic syntax of lambdas and what differentiates these anonymous functions from standard anonymous classes. Lastly, you'll learn how to invoke lambdas and look at the bytecode generated. After reading this book, you'll understand lambdas in depth, their background, syntax, implementation details, and how and when to use them. You'll also have a clear knowledge of the difference between functions and classes, and why that's relevant to lambdas. This knowledge will enable you to appreciate the improvements to type inference that drive a lot of the new features in modern Java, and will increase your understanding of method references and scoping. Style and approach This book is a deep dive into one of the core new features of the Java language ? Lambdas. It covers them in great details, making sure that you fully understand how lambdas work, and how they can be put to use in your own programs.
Contents:
Cover
Copyright
Credits
About the Author
www.PacktPub.com
Customer Feedback
Table of Contents
Preface
Chapter 1: Introduction
The road to modern Java
Modern Java features
Chapter 2: Lambdas Introduction
λs in functional programming
1930s and the lambda calculus
1950s and LISP
What is a lambda
Functions vs classes
Lambdas in modern Java
Some theoretical differences
Some concrete differences
Capture semantics
Shadowed variables
Summary
λ basic syntax
Syntax breakdown
Chapter 3: Lambdas in Depth
Functional interfaces
@FunctionalInterface
Extension
Other interface improvements
Type inference improvements
Java type inference
Target-typing for lambdas
Type parameters in method calls
Type parameters in chained method calls
Method references
Example
Method reference types
Constructor reference
Static method reference
Instance method reference of particular object (in this case, a closure)
Instance method reference of a arbitrary object whose instance is supplied later (lambda)
Scoping
Effectively final
Circumventing final
Exception handling
Using a callback
Dealing with exceptions when writing lambdas
As a caller (dealing with exceptions when calling lambdas)
Lambdas vs closures
Basic differences
Other differences
Bytecode recap
Descriptors
Converting a method signature
Code examples
Example 1
Example 2
Example 3
Example 4
Example 4 (with method reference)
Example 5
Appendix: Bytecode
WaitFor
Example 4 (with Method Reference)
Index.
Notes:
Includes index.
Description based on online resource; title from PDF title page (ebrary, viewed April 21, 2017).
ISBN:
9781787281028
1787281027
OCLC:
983202669

The Penn Libraries is committed to describing library materials using current, accurate, and responsible language. If you discover outdated or inaccurate language, please fill out this feedback form to report it and suggest alternative language.

Find

Home Release notes

My Account

Shelf Request an item Bookmarks Fines and fees Settings

Guides

Using the Find catalog Using Articles+ Using your account