While the term "lambda expression" may sound abstract and academic, Java 8 Lambdas can have a big impact on how you program every day. In simplest terms, a lambda expression is a function—a bit of code—that you can pass to another method as an argument. Thus, you can cope with changing requirements by using a behavior, represented by a lambda, as a parameter. Java 8's functiona...
While the term "lambda expression" may sound abstract and academic, Java 8 Lambdas can have a big impact on how you program every day. In simplest terms, a lambda expression is a function—a bit of code—that you can pass to another method as an argument. Thus, you can cope with changing requirements by using a behavior, represented by a lambda, as a parameter. Java 8's functional programming features, like lambdas and the new Stream API that enables a cleaner way to iterate through collections, can help you write concise, maintainable code that scales easily and performs well on multicore architectures.
Java 8 in Action is a clearly-written guide to Java 8 lambdas and functional programming in Java. It begins with a practical introduction to the structure and benefits of lambda expressions in real-world Java code. The book then introduces the Stream API and shows how it can make collections-related code radically easier to understand and maintain. Along the way, you'll discover new FP-oriented design patterns with Java 8 for code reuse, code readability, exception handling, data manipulation, and concurrency. For developers also exploring other functional languages on the JVM, the book concludes with a quick survey of useful functional features in Scala.
作者简介
· · · · · ·
Raoul-Gabriel Urma has worked as a software engineer for Oracle's Java Platform Group, Google's Python team, Ebay, and Goldman Sachs as well as for several startup projects. He's currently completing a PhD in Computer Science at the University of Cambridge and is a regular speaker and instructor. Mario Fusco is a senior software engineer at Red Hat working on Drools, the JBoss ...
Raoul-Gabriel Urma has worked as a software engineer for Oracle's Java Platform Group, Google's Python team, Ebay, and Goldman Sachs as well as for several startup projects. He's currently completing a PhD in Computer Science at the University of Cambridge and is a regular speaker and instructor. Mario Fusco is a senior software engineer at Red Hat working on Drools, the JBoss rule engine. He created the open source library lambdaj, an internal Java DSL for manipulating collections in a functional way. Alan Mycroft is Professor of Computer Science at the University of Cambridge, where he researches programming languages, their semantics, optimization and implementation. He is a co-founder and Trustee of the Raspberry Pi Foundation.
You can follow Raoul and Mario on Twitter at @raoulUK and @mariofusco.
目录
· · · · · ·
Table of Contents
PART I: FUNDAMENTALS
1 Java 8: why should you care? - FREE
2 Passing code with behavior parameterization - AVAILABLE
3 Lambda expressions - AVAILABLE
PART II: FUNCTIONAL-STYLE DATA PROCESSING
· · · · · ·
(更多)
Table of Contents
PART I: FUNDAMENTALS
1 Java 8: why should you care? - FREE
2 Passing code with behavior parameterization - AVAILABLE
3 Lambda expressions - AVAILABLE
PART II: FUNCTIONAL-STYLE DATA PROCESSING
4 Processing data with streams - AVAILABLE
5 Collecting data with streams - AVAILABLE
6 Parallel data processing and performance - AVAILABLE
PART III: EFFECTIVE JAVA 8 PROGRAMMING
7 Refactoring, testing, debugging - AVAILABLE
8 Default methods - AVAILABLE
9 Optional: a better alternative to null - AVAILABLE
10 CompletableFuture: composable asynchronous programming - AVAILABLE
11 New Date and Time API - AVAILABLE
PART IV: BEYOND JAVA 8
12 Thinking functionally - AVAILABLE
13 Functional programming techniques - AVAILABLE
14 Blending OOP and FP: comparing Java 8 and Scala - AVAILABLE
15 Conclusions and "where next" for Java - FREE
APPENDICES:
A Miscellaneous language updates - AVAILABLE
B Miscellaneous library updates - AVAILABLE
C Performing multiple operations in parallel on a Stream - AVAILABLE
D Lambdas and bytecode - AVAILABLE
· · · · · · (收起)
In fact, using synchronized across multiple processing cores is far more expensive than we often expect, because synchronization forces code to execute sequentially, which works against the goal of parallelism. (查看原文)
0 有用 3点一直线 2021-08-05 01:16:28
这个书 讲了java 8 新的几个特性,挺好的。看完基础可以看这个。 讲了lambda, stream, interface default method 这些新的东西。
0 有用 了了 2018-01-14 15:09:53
重点是 action,原理性知识讲的很少,略过了函数式编程的思考和scala部分,后续系统学习函数式时再补
0 有用 竪 2025-01-02 17:57:29 新疆
好书,就是有点太详细了,可以根据自己的需求有选择性地看,或者根据相关主题看看博文,有不懂的再回顾
0 有用 DDGogogo 2018-03-19 15:03:06
对 jdk 8 的 stream, lambda 讲解通俗易懂。
0 有用 villim 2024-02-06 02:23:46 广东
写得真的细!JDK8的所有新知识点都说清楚了。 虽然要用17了,但8仍然没用利索。