My Account Log in

2 options

Cruising along with Java : Modernize and Modularize with the Latest Features.

Ebook Central College Complete Available online

View online

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

View online
Format:
Book
Author/Creator:
Subramaniam, Venkat.
Language:
English
Subjects (All):
Java (Computer program language).
Physical Description:
1 online resource (297 pages)
Edition:
1st ed.
Place of Publication:
La Vergne : Pragmatic Programmers, LLC, The, 2025.
Summary:
Java is on a fast-paced development schedule that brings with it improved design capabilities and enhancements for application security. Learn about the changes to Java, from version 9 to 24, and apply new features to build enterprise applications faster and with fewer errors. Get up to speed on how to make your code concise, expressive, and less error prone, and create better OO programs with the newest features. Modularize and create asynchronous applications with ease and proper error handling. This book contains twelve chapters that dive deep into the features, using plenty of examples for you to practice along with. Java is changing quickly - don't be left behind. This book will keep you up to date on the amazing capabilities of the Java language introduced between versions 9 and 24. Whether you are using Java 8 or one of the newer versions of Java, this book will serve as your practical guide to explore and apply the features in these versions of Java. Learn to properly use type inference and avoid its pitfalls. Use text blocks to write elegant multiline strings and embed XML and JSON documents in code. Design better OO code with records and sealed classes, and along the way, learn proper ways to apply these new ideas. Reduce verbosity and hidden errors in code using switch expressions and pattern matching syntax. Take your upgrade journey further by modularizing your Java code, to make it more secure and manage dependencies clearly. Leverage those capabilities to more easily and dynamically discover services. Learn to create highly performant and resilient asynchronous applications, using the brand new virtual threads (fibers) and structured concurrency. Don't tolerate clumsy old Java code; instead, benefit from the significant changes to the language in versions 9 through 24. What You Need: To make use of all the features in this book, you'll need at least Java 24.
Contents:
Cover
Table of Contents
Acknowledgments
Preface
What's in This Book?
Who's This Book For?
Java Version Used in This Book
How to Read the Code Examples
Online Resources
1. The Evolution of Java
Java Is Agile
Fast-Paced Change
Recent Changes to Java
Moving Ahead from an LTS
Cruising Along with Java
Part I-Syntax Sugar
2. Using Type Inference
Type Inference and Java
Generics and Type Witness
Diamond Operator Enhancements
Lambda Expressions Parameters Type Inference
Local Variable Type Inference
Using Type Inference with for and try
var: Not a Type nor a Keyword
Targeted Intersection Types
Extent of Type Inference
Mind the Inference
Wrapping Up
3. Reducing Clutter with Text Blocks
From Noisy to Nice
Embedding Strings
Smart Indentations
Trailing Spaces and Special Escapes
Creating XML Documents Using Text Blocks
Creating JSON Output Using Text Blocks
Part II-Design Aid
4. Programming with Records
From Verbose to Succinct
Components, Fields, Getters, and Metadata
Extent of Immutability
Built-in Methods
Implementing Interfaces
Restrictions for the Greater Good
Considering a Custom Canonical Constructor?
Preferring the Compact Constructor
Creating a Custom Noncanonical Constructor
(Local) Records as Tuples
5. Designing with Sealed Classes and Interfaces
Need for a Closed Hierarchy
Using sealed
Sealed Related Metadata
Using the permits Clause
Constraints on the Subclasses
Part III-Fluent Expressions
6. Switching to Switch Expression
From Statements to Expressions
Using Multiple Labels in a Case
Cases with Non-expressions
Completeness of a switch Expression
7. Using Powerful Pattern Matching.
Pattern Matching with instanceof
Using Type Matching
Matching null
Guarded Patterns
Dominance Check
Completeness Check
Completeness Check and Sealed Classes/Interfaces
Deciding to Use default or Not
Pattern Matching Primitive Types
Destructuring Records When Pattern Matching
Type Inference with Destructuring Records
Unnamed Variables in Pattern Matching
Part IV-Modularization
8. Modularizing Your Java Applications
Maven, Gradle, and Modularization
Modules and the Benefits of Modularization
Modularized Java
Starting with a Legacy Application
Perils of the Existing Design
Modularizing the Space Station Application
Architectural Constraints Promoted by Modules
9. Working with Modules
Exploring the Module Metadata
Defining APIs in a Modular Way
Targeted Linking Using jlink
10. Creating Plug-ins with ServiceLoader
The Plug-in Architecture
Defining a Specification Module
Creating a Client Module
Implementing a Plug-in
Implementing Additional Plug-ins
Reloading the Implementations
Functional Style Iteration
Part V-Custom Functional Pipeline Steps
11. Extending Functional Pipelines with Gatherers
Why Do We Need Gatherers?
Creating Custom Steps Using the gather() Method
Using Built-in Gatherers
12. Creating Custom Gatherers
The Machinery Behind the gather() Method
Flavors of Gatherers
Creating Sequential Stateless Gatherers
Creating Sequential Stateful Gatherers
Creating Parallelizable Stateless Gatherers
Creating Parallelizable Stateful Gatherers
Bibliography
Index
- SYMBOLS -
- A -
- B -
- C -
- D -
- E -
- F -
- G -
- H -
- I -
- J -
- L -
- M -
- N -
- O -
- P -
- Q -
- R -.
- S -
- T -
- U -
- V -
- W -
- X -
- Y -.
Notes:
Electronic book.
Description based on publisher supplied metadata and other sources.
Other Format:
Print version: Subramaniam, Venkat Cruising along with Java
ISBN:
9798888651674
OCLC:
1526840669

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