1.1 Basic Elements of a Class Declaration
1.2 Static Members in Class Declaration
2.2 Flagging Uninitialized Local Variables of Primitive Data Types
2.3 Flagging Uninitialized Local Reference Variables
3.5 Declaring Enum Constructors and Members
3.6 Declaring Constant-Specific Class Bodies
3.9 Using Multidimensional Arrays
3.13 Array Elements as Primitive Data Values
3.14 Array Elements as Reference Values
3.16 Passing Program Arguments
4.1 Defining Packages and Using Type Import
4.3 Avoiding the Interface Constant Antipattern
4.6 Conflict in Importing Static Method with the Same Signature
4.7 Importing Nested Static Types
4.10 Accessibility Modifiers for Classes and Interfaces
4.12 Public Accessibility of Members
5.2 Numeric Promotion in Arithmetic Expressions
5.3 Short-Circuit Evaluation Involving Conditional Operators
6.1 Fall Through in a switch
Statement
6.2 Using break
in a switch
Statement
6.8 Labeled continue
Statement
6.13 The try-catch-finally
Construct
6.14 The try-finally
Construct
6.15 The finally
Block and the return
Statement
7.1 Extending Classes: Inheritance and Accessibility
7.2 Overriding, Overloading, and Hiding
7.5 The this()
Constructor Call
7.6 The super()
Constructor Call
7.9 Assigning and Passing Reference Values
7.10 Choosing the Most Specific Method (Simple Case)
7.11 Overloaded Method Resolution
7.12 The instanceof
and Cast Operators
7.13 Using the instanceof
Operator
7.14 Polymorphism and Dynamic Method Lookup
7.15 Implementing Data Structures by Inheritance and Aggregation
8.1 Overview of Type Declarations
8.3 Importing Static Member Types
8.4 Accessing Members in Enclosing Context (Static Member Classes)
8.5 Defining and Instantiating Non-static Member Classes
8.6 Special Form of this
and new
Constructs in Non-static Member Classes
8.7 Inheritance Hierarchy and Enclosing Context
8.9 Access in Enclosing Context (Local Classes)
8.10 Instantiating Local Classes
8.11 Objects of Local Classes as Caches
8.12 Defining Anonymous Classes
8.13 Accessing Declarations in Enclosing Context (Anonymous Classes)
9.1 Garbage Collection Eligibility
9.3 Invoking Garbage Collection
9.4 Initializer Expression Order and Method Calls
9.5 Exceptions in Initializer Expressions
9.6 Static Initializers and Forward References
9.7 Static Initializer Blocks and Exceptions
9.8 Instance Initializers and Forward References
9.9 Instance Initializer Block in Anonymous Class
9.10 Exception Handling in Instance Initializer Blocks
9.11 Object State Construction
9.12 Initialization under Object State Construction
10.1 Methods in the Object
class
10.2 String Representation of Integers
10.3 String Construction and Equality
10.4 Reading Characters from a String
11.1 Listing Files Under a Directory
11.3 Reading and Writing Binary Values
11.4 Demonstrating Readers and Writers, and Character Encoding
11.9 Serialization and Inheritance
12.5 Using the DateFormat
class
12.6 Using the NumberFormat
class
12.11 Parsing Primitive Values and Strings
12.12 Using Delimiters and Patterns with a Scanner
12.14 Using the format()
Method
13.1 Implementing the Runnable
Interface
13.2 Extending the Thread
Class
14.2 A Generic Class for Nodes
14.3 A Generic Interface and its Implementation
14.6 Illustrating Get and Set Operations Using Parameterized References
14.7 Implementing a Simplified Generic Stack
14.8 Declaring and Calling Generic Methods
14.11 Using the @Override
Annotation
14.13 Overriding from Generic Supertype
14.14 Missing Supertype Parameterization
14.15 Genericity Cannot Be Added to Inherited Methods
14.16 Type Parameter in throws
Clause
15.1 A Test Case for Version Numbers
15.2 Not Overriding the equals()
and the hashCode()
Methods
15.3 Testing the equals()
and the hashCode()
Methods
15.4 Implementing the equals()
Method
15.5 Implications of Overriding the equals()
Method
15.6 Implementing the hashCode()
Method
15.7 Implications of Overriding the hashCode()
Method
15.8 Implementing the compareTo()
Method of the Comparable
Interface
15.9 Implications of Implementing the compareTo()
Method
15.10 Natural Ordering and Total Ordering
15.11 Using a Comparator for Version Numbers
15.13 Using a for(:)
Loop to Iterate Over a Collection
15.14 Converting Collections to Arrays