List of Examples

1.1 Basic Elements of a Class Declaration

1.2 Static Members in Class Declaration

1.3 Defining a Subclass

1.4 An Application

2.1 Default Values for Fields

2.2 Flagging Uninitialized Local Variables of Primitive Data Types

2.3 Flagging Uninitialized Local Reference Variables

3.1 A JavaBean

3.2 Using the this Reference

3.3 Namespaces

3.4 Using Enums

3.5 Declaring Enum Constructors and Members

3.6 Declaring Constant-Specific Class Bodies

3.7 Using Arrays

3.8 Using Anonymous Arrays

3.9 Using Multidimensional Arrays

3.10 Passing Primitive Values

3.11 Passing Reference Values

3.12 Passing Arrays

3.13 Array Elements as Primitive Data Values

3.14 Array Elements as Reference Values

3.15 Calling a Varargs Method

3.16 Passing Program Arguments

4.1 Defining Packages and Using Type Import

4.2 Single Static Import

4.3 Avoiding the Interface Constant Antipattern

4.4 Importing Enum Constants

4.5 Shadowing by Importing

4.6 Conflict in Importing Static Method with the Same Signature

4.7 Importing Nested Static Types

4.8 Using Properties

4.9 Class Scope

4.10 Accessibility Modifiers for Classes and Interfaces

4.11 Abstract Classes

4.12 Public Accessibility of Members

4.13 Accessing Static Members

4.14 Accessing Final Members

4.15 Synchronized Methods

5.1 Operand Evaluation Order

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.3 Nested switch Statement

6.4 Enums in switch Statement

6.5 The break Statement

6.6 Labeled break Statement

6.7 The continue Statement

6.8 Labeled continue Statement

6.9 The return Statement

6.10 Method Execution

6.11 The try-catch Construct

6.12 Exception Propagation

6.13 The try-catch-finally Construct

6.14 The try-finally Construct

6.15 The finally Block and the return Statement

6.16 Throwing Exceptions

6.17 The throws Clause

6.18 Using Assertions

7.1 Extending Classes: Inheritance and Accessibility

7.2 Overriding, Overloading, and Hiding

7.3 Using the super Keyword

7.4 Constructor Overloading

7.5 The this() Constructor Call

7.6 The super() Constructor Call

7.7 Interfaces

7.8 Variables in Interfaces

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.2 Static Member Types

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.8 Extending Inner Classes

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.2 Using Finalizers

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.2 Copy a File

11.3 Reading and Writing Binary Values

11.4 Demonstrating Readers and Writers, and Character Encoding

11.5 Changing Passwords

11.6 Object Serialization

11.7 Non-Serializable Objects

11.8 Customized Serialization

11.9 Serialization and Inheritance

12.1 Understanding Locales

12.2 Using the Date class

12.3 Using the Calendar Class

12.4 Formatting Date/Time

12.5 Using the DateFormat class

12.6 Using the NumberFormat class

12.7 Splitting

12.8 String Pattern Matching

12.9 Match and Replace

12.10 Tokenizing Mode

12.11 Parsing Primitive Values and Strings

12.12 Using Delimiters and Patterns with a Scanner

12.13 Multi-Line Mode

12.14 Using the format() Method

13.1 Implementing the Runnable Interface

13.2 Extending the Thread Class

13.3 Mutual Exclusion

13.4 Thread States

13.5 Waiting and Notifying

13.6 Joining of Threads

13.7 Thread Termination

13.8 Deadlock

14.1 A Legacy Class

14.2 A Generic Class for Nodes

14.3 A Generic Interface and its Implementation

14.4 Extending Generic Types

14.5 Unchecked Warnings

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.9 Flexible Comparisons

14.10 Using Recursive Bounds

14.11 Using the @Override Annotation

14.12 Subsignatures

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

14.17 Generic Nested Classes

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.12 Using an Iterator

15.13 Using a for(:) Loop to Iterate Over a Collection

15.14 Converting Collections to Arrays

15.15 Traversing Over Sets

15.16 Using Sets

15.17 Using Navigable Sets

15.18 Using Lists

15.19 Using Priority Queues

15.20 Using Deques as a Stack and as a FIFO Queue

15.21 Using Maps

15.22 Using Navigable Maps

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.142.171.137