Book description
This updated edition of the Nutshell guide not only helps experienced Java programmers get the most out of versions through Java 17, it also serves as a learning path for new developers. Chock-full of examples that demonstrate how to take complete advantage of modern Java APIs and development best practices, this thoroughly revised book includes new material on recent enhancements to the Java object model that every developer should know about.
The first section provides a fast-paced, no-fluff introduction to the Java programming language and the core runtime aspects of the Java platform. The second section is a reference to core concepts and APIs that explains how to perform real programming work in the Java environment.
- Get up to speed on language details through Java 17
- Learn object-oriented programming using basic Java syntax
- Explore generics, enumerations, annotations, and lambda expressions
- Understand techniques used in object-oriented design
- Examine how concurrency and memory are intertwined
- Work with Java collections and handle common data formats
- Delve into Java's latest I/O APIs including asynchronous channels
- Become familiar with development tools in OpenJDK
Publisher resources
Table of contents
- Foreword
- Preface
- I. Introducing Java
- 1. Introduction to the Java Environment
-
2. Java Syntax from the Ground Up
- Java Programs from the Top Down
- Lexical Structure
- Primitive Data Types
- Expressions and Operators
-
Statements
- Expression Statements
- Compound Statements
- The Empty Statement
- Labeled Statements
- Local Variable Declaration Statements
- The if/else Statement
- The switch Statement
- The switch Expression
- The while Statement
- The do Statement
- The for Statement
- The foreach Statement
- The break Statement
- The continue Statement
- The return Statement
- The synchronized Statement
- The throw Statement
- The try/catch/finally Statement
- The try-with-resources Statement
- The assert Statement
- Methods
- Introduction to Classes and Objects
- Arrays
- Reference Types
- Packages and the Java Namespace
- Java Source File Structure
- Defining and Running Java Programs
- Summary
- 3. Object-Oriented Programming in Java
- 4. The Java Type System
-
5. Introduction to Object-Oriented Design in Java
- Java Values
- Important Common Methods
- Constants
- Working with Fields
- Field Inheritance and Accessors
- Singleton
- Factory Methods
- Builders
- Interfaces Versus Abstract Classes
- Do Default Methods Change Java’s Inheritance Model?
- OOD Using Lambdas
- OOD Using Sealed Types
- OOD Using Records
- Instance Methods or Class Methods?
- Composition Versus Inheritance
- Exceptions and Exception Handling
- Safe Java Programming
- 6. Java’s Approach to Memory and Concurrency
- II. Working with the Java Platform
- 7. Programming and Documentation Conventions
- 8. Working with Java Collections
- 9. Handling Common Data Formats
- 10. File Handling and I/O
- 11. Classloading, Reflection, and Method Handles
- 12. Java Platform Modules
- 13. Platform Tools
- Appendix. Beyond Java 17
- Index
- About the Authors
Product information
- Title: Java in a Nutshell, 8th Edition
- Author(s):
- Release date: February 2023
- Publisher(s): O'Reilly Media, Inc.
- ISBN: 9781098131005
You might also like
book
Java in a Nutshell, 7th Edition
This updated edition of Java in a Nutshell not only helps experienced Java programmers get the …
book
Learning Java, 6th Edition
Ideal for working programmers new to Java, this best-selling book guides you through the language features …
book
Learning Java, 4th Edition
Java is the preferred language for many of today’s leading-edge technologies—everything from smartphones and game consoles …
book
The Well-Grounded Java Developer, Second Edition
Understanding Java from the JVM up gives you a solid foundation to grow your expertise and …