Beginning Java 8 Language Features: Lambda Expressions, Inner Classes, Threads, I/O, Collections, and Streams
暫譯: Java 8 語言特性入門:Lambda 表達式、內部類別、執行緒、I/O、集合與串流
Kishori Sharan
商品描述
Beginning Java 8 Language Features covers essential and advanced features of the Java programming language such as the new lambda expressions (closures), inner classes, threads, I/O, Collections, garbage collection, streams, and more. Author Kishori Sharan provides over 60 diagrams and 290 complete programs to help you visualize and better understand the topics covered in this book.
The book starts with a series of chapters on the essential language features provided by Java, including annotations, inner classes, reflection, and generics. These topics are then complemented by details of how to use lambda expressions, allowing you to build powerful and efficient Java programs. The chapter on threads follows this up and discusses everything from the very basic concepts of a thread to the most advanced topics such as synchronizers, the fork/join framework, and atomic variables.
This book contains unmatched coverage of Java I/O, including NIO 2.0, the Path API, the FileVisitor API, the watch service and asynchronous file I/O. With this in-depth knowledge, your data- and file-management programs will be able to take advantage of every feature of Java's powerful I/O framework.
Finally, you'll learn how to use the Stream API, a new, exciting addition to Java 8, to perform aggregate operations on collections of data elements using functional-style programming. You'll examine the details of stream processing such as creating streams from different data sources, learning the difference between sequential and parallel streams, applying the filter-map-reduce pattern, and dealing with optional values.
商品描述(中文翻譯)
《Beginning Java 8 Language Features》涵蓋了 Java 程式語言的基本和進階特性,例如新的 lambda 表達式(閉包)、內部類別、執行緒、I/O、集合、垃圾回收、串流等。作者 Kishori Sharan 提供了超過 60 張圖表和 290 個完整的程式範例,幫助您視覺化並更好地理解本書所涵蓋的主題。
本書以一系列章節開始,介紹 Java 提供的基本語言特性,包括註解、內部類別、反射和泛型。這些主題隨後由如何使用 lambda 表達式的細節補充,讓您能夠構建強大且高效的 Java 程式。接下來的執行緒章節討論了從執行緒的基本概念到最進階的主題,如同步器、fork/join 框架和原子變數。
本書對 Java I/O 的涵蓋無與倫比,包括 NIO 2.0、Path API、FileVisitor API、監視服務和非同步檔案 I/O。透過這些深入的知識,您的資料和檔案管理程式將能夠充分利用 Java 強大的 I/O 框架的每一個特性。
最後,您將學習如何使用 Stream API,這是 Java 8 中一個新的、令人興奮的新增功能,來對資料元素集合執行聚合操作,使用函數式編程風格。您將檢視串流處理的細節,例如從不同資料來源創建串流、了解順序串流和並行串流之間的差異、應用過濾-映射-歸約模式,以及處理可選值。