Learning Java Lambdas
暫譯: 學習 Java Lambda 表達式

Toby Weston

  • 出版商: Packt Publishing
  • 出版日期: 2017-03-31
  • 售價: $1,360
  • 貴賓價: 9.5$1,292
  • 語言: 英文
  • 頁數: 114
  • 裝訂: Paperback
  • ISBN: 1787282082
  • ISBN-13: 9781787282087
  • 相關分類: Java 程式語言
  • 海外代購書籍(需單獨結帳)

買這商品的人也買了...

商品描述

Key Features

  • 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

Book Description

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.

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

About the Author

Toby Weston specializes in

商品描述(中文翻譯)

主要特點


  • 深入探討現代 Java 中最重要的新增功能之一

  • 掌握 Java 的 lambda 表達式,充分理解函數、類別和作用域。

  • 提升您的程式設計技能,使您能夠編寫更乾淨且更具動態性的程式碼

書籍描述

在這本短小的書中,我們深入探討 Java 中的 lambda 表達式及其支援功能。書中涵蓋了基本主題,如函數介面和類型推斷,以及 lambda 表達式和閉包之間的主要差異。您將了解函數式程式設計和 lambda 的背景,然後進一步理解 lambda 的基本語法,以及這些匿名函數與標準匿名類別的區別。最後,您將學習如何調用 lambda 並查看生成的位元組碼。

閱讀完這本書後,您將深入理解 lambda 的背景、語法、實作細節,以及如何和何時使用它們。您還將清楚了解函數和類別之間的差異,以及這對 lambda 的相關性。這些知識將使您能夠欣賞類型推斷的改進,這驅動了現代 Java 中許多新功能的實現,並將增強您對方法引用和作用域的理解。

您將學到什麼


  • 什麼是 lambda 以及它與其他 Java 特性的區別

  • 如何在自己的專案中有效使用 lambda

  • 方法引用和進階作用域的使用

  • lambda 和閉包之間的差異

  • 使用 lambda 時產生的位元組碼差異

關於作者

Toby Weston 專注於