Books & Videos

Table of Contents

  1. Chapter 1 What's New?

    1. Working with Arrays

    2. Using Queues

    3. Ordering Queues Using Comparators

    4. Overriding Return Types

    5. Taking Advantage of Better Unicode

    6. Adding StringBuilder to the Mix

  2. Chapter 2 Generics

    1. Using Type-Safe Lists

    2. Using Type-Safe Maps

    3. Iterating Over Parameterized Types

    4. Accepting Parameterized Types as Arguments

    5. Returning Parameterized Types

    6. Using Parameterized Types as Type Parameters

    7. Checking for Lint

    8. Generics and Type Conversions

    9. Using Type Wildcards

    10. Writing Generic Types

    11. Restricting Type Parameters

  3. Chapter 3 Enumerated Types

    1. Creating an Enum

    2. Declaring Enums Inline

    3. Iterating Over Enums

    4. Switching on Enums

    5. Maps of Enums

    6. Sets of Enums

    7. Adding Methods to an Enum

    8. Implementing Interfaces with Enums

    9. Value-Specific Class Bodies

    10. Manually Defining an Enum

    11. Extending an Enum

  4. Chapter 4 Autoboxing and Unboxing

    1. Converting Primitives to Wrapper Types

    2. Converting Wrapper Types to Primitives

    3. Incrementing and Decrementing Wrapper Types

    4. Boolean Versus boolean

    5. Conditionals and Unboxing

    6. Control Statements and Unboxing

    7. Method Overload Resolution

  5. Chapter 5 varargs

    1. Creating a Variable-Length Argument List

    2. Iterating Over Variable-Length Argument Lists

    3. Allowing Zero-Length Argument Lists

    4. Specify Object Arguments Over Primitives

    5. Avoiding Automatic Array Conversion

  6. Chapter 6 Annotations

    1. Using Standard Annotation Types

    2. Annotating an Overriding Method

    3. Annotating a Deprecated Method

    4. Suppressing Warnings

    5. Creating Custom Annotation Types

    6. Annotating Annotations

    7. Defining an Annotation Type's Target

    8. Setting the Retention of an Annotation Type

    9. Documenting Annotation Types

    10. Setting Up Inheritance in Annotations

    11. Reflecting on Annotations

  7. Chapter 7 The for/in Statement

    1. Ditching Iterators

    2. Iterating over Arrays

    3. Iterating over Collections

    4. Avoiding Unnecessary Typecasts

    5. Making Your Classes Work with for/in

    6. Determining List Position and Variable Value

    7. Removing List Items in a for/in Loop

  8. Chapter 8 Static Imports

    1. Importing Static Members

    2. Using Wildcards in Static Imports

    3. Importing Enumerated Type Values

    4. Importing Multiple Members with the Same Name

    5. Shadowing Static Imports

  9. Chapter 9 Formatting

    1. Creating a Formatter

    2. Writing Formatted Output

    3. Using the format( ) Convenience Method

    4. Using the printf( ) Convenience Method

  10. Chapter 10 Threading

    1. Handling Uncaught Exceptions in Threads

    2. Using Thread-Safe Collections

    3. Using Blocking Queues

    4. Specifying Timeouts for Blocking

    5. Separating Thread Logic from Execution Logic

    6. Using Executor as a Service

    7. Using Callable Objects

    8. Executing Tasks Without an ExecutorService

    9. Scheduling Tasks

    10. Advanced Synchronizing

    11. Using Atomic Types

    12. Locking Versus Synchronization

  1. Colophon