Foreword |
|
ix | |
Preface |
|
xi | |
|
|
|
1 Introduction to the Java Environment |
|
|
3 | (1) |
|
The Language, the JVM, and the Ecosystem |
|
|
3 | (8) |
|
Comparing Java to Other Languages |
|
|
11 | (1) |
|
Answering Some Criticisms of Java |
|
|
12 | (4) |
|
A Brief History of Java and the JVM |
|
|
16 | (2) |
|
|
18 | (1) |
|
2 Java Syntax from the Ground Up |
|
|
19 | (1) |
|
Java Programs from the Top Down |
|
|
20 | (1) |
|
|
20 | (5) |
|
|
25 | (9) |
|
Expressions and Operators |
|
|
34 | (18) |
|
|
52 | (22) |
|
|
74 | (7) |
|
Introduction to Classes and Objects |
|
|
81 | (5) |
|
|
86 | (8) |
|
|
94 | (4) |
|
Packages and the Java Namespace |
|
|
98 | (5) |
|
Java Source File Structure |
|
|
103 | (1) |
|
Defining and Running Java Programs |
|
|
104 | (1) |
|
|
105 | (2) |
|
3 Object-Oriented Programming in Java |
|
|
107 | (1) |
|
Overview of Classes and Records |
|
|
107 | (4) |
|
|
111 | (6) |
|
Creating and Initializing Objects |
|
|
117 | (5) |
|
Subclasses and Inheritance |
|
|
122 | (13) |
|
Data Hiding and Encapsulation |
|
|
135 | (8) |
|
Abstract Classes and Methods |
|
|
143 | (5) |
|
|
148 | (2) |
|
|
150 | (1) |
|
|
151 | (1) |
|
|
152 | (10) |
|
|
162 | (13) |
|
|
175 | (5) |
|
|
180 | (7) |
|
|
187 | (11) |
|
Describing the Java Type System |
|
|
198 | (3) |
|
|
201 | (4) |
|
5 Introduction to Object-Oriented Design in Java |
|
|
205 | (1) |
|
|
205 | (2) |
|
|
207 | (5) |
|
|
212 | (1) |
|
|
212 | (1) |
|
Field Inheritance and Accessors |
|
|
213 | (2) |
|
|
215 | (2) |
|
|
217 | (1) |
|
|
218 | (2) |
|
Interfaces Versus Abstract Classes |
|
|
220 | (2) |
|
Do Default Methods Change Java's Inheritance Model? |
|
|
222 | (1) |
|
|
223 | (2) |
|
|
225 | (2) |
|
|
227 | (1) |
|
Instance Methods or Class Methods? |
|
|
228 | (2) |
|
Composition Versus Inheritance |
|
|
230 | (2) |
|
Exceptions and Exception Handling |
|
|
232 | (2) |
|
|
234 | (3) |
|
6 Java's Approach to Memory and Concurrency |
|
|
237 | (1) |
|
Basic Concepts of Java Memory Management |
|
|
237 | (4) |
|
How the JVM Optimizes Garbage Collection |
|
|
241 | (2) |
|
|
243 | (5) |
|
|
248 | (1) |
|
Java's Support for Concurrency |
|
|
249 | (12) |
|
|
261 | (2) |
|
|
263 | (4) |
|
Part II Working with the Java Platform |
|
|
|
7 Programming and Documentation Conventions |
|
|
267 | (1) |
|
Naming and Capitalization Conventions |
|
|
267 | (2) |
|
|
269 | (2) |
|
Java Documentation Comments |
|
|
271 | (8) |
|
|
279 | (1) |
|
Conventions for Portable Programs |
|
|
280 | (2) |
|
|
282 | (1) |
|
8 Working with Java Collections |
|
|
283 | (1) |
|
Introduction to Collections API |
|
|
283 | (23) |
|
Java Streams and Lambda Expressions |
|
|
306 | (11) |
|
|
317 | (2) |
|
9 Handling Common Data Formats |
|
|
319 | (1) |
|
|
319 | (10) |
|
|
329 | (5) |
|
|
334 | (7) |
|
|
341 | (2) |
|
|
343 | (24) |
|
|
343 | (6) |
|
|
349 | (4) |
|
|
353 | (3) |
|
|
356 | (3) |
|
|
359 | (6) |
|
|
365 | (2) |
|
11 Classloading, Reflection, and Method Handles |
|
|
367 | (22) |
|
Class Files, Class Objects, and Metadata |
|
|
367 | (3) |
|
|
370 | (2) |
|
Secure Programming and Classloading |
|
|
372 | (2) |
|
|
374 | (3) |
|
|
377 | (7) |
|
|
384 | (5) |
|
|
389 | (18) |
|
|
390 | (4) |
|
|
394 | (9) |
|
|
403 | (3) |
|
|
406 | (1) |
|
|
407 | (24) |
|
|
407 | (18) |
|
|
425 | (3) |
|
Introduction to Java Flight Recorder (JFR) |
|
|
428 | (1) |
|
|
429 | (2) |
Appendix. Beyond Java 17 |
|
431 | (10) |
Index |
|
441 | |