Trail: Essential Classes: Table of Contents
Exceptions
What Is an Exception?
The Catch or Specify Requirement
Catching and Handling Exceptions
The try Block
The catch Blocks
The finally Block
Putting It All Together
Specifying the Exceptions Thrown by a Method
How to Throw Exceptions
Chained Exceptions
Creating Exception Classes
Unchecked Exceptions—The Controversy
Advantages of Exceptions
Summary
Questions and Exercises
Basic I/O
I/O Streams
Byte Streams
Character Streams
Buffered Streams
Scanning and Formatting
Scanning
Formatting
I/O from the Command Line
Data Streams
Object Streams
File I/O
File Objects
Random Access Files
The New I/O Packages
Summary
Questions and Exercises: Basic I/O
Concurrency
Processes and Threads
Thread Objects
Defining and Starting a Thread
Pausing Execution with Sleep
Interrupts
Joins
The SimpleThreads Example
Synchronization
Thread Interference
Memory Consistency Errors
Synchronized Methods
Intrinsic Locks and Synchronization
Atomic Access
Liveness
Deadlock
Starvation and Livelock
Guarded Blocks
Immutable Objects
A Synchronized Class Example
A Strategy for Defining Immutable Objects
High-Level Concurrency Objects
Lock Objects
Executors
Executor Interfaces
Thread Pools
Concurrent Collections
Atomic Variables
For Further Reading
Questions and Exercises: Concurrency
Regular Expressions
Introduction
Test Harness
String Literals
Character Classes
Predefined Character Classes
Quantifiers
Capturing Groups
Boundary Matchers
Methods of the Pattern Class
Methods of the Matcher Class
Methods of the PatternSyntaxException Class
Additional Resources
Summary
Questions and Exercises: Regular Expressions
The Platform Environment
Configuration Utilities
Properties
Command-Line Arguments
Environment Variables
Other Configuration Utilities
System Utilities
Command-Line I/O Objects
System Properties
The Security Manager
Miscellaneous Methods in System
PATH and CLASSPATH
Questions and Exercises: The Platform Environment
Previous page:
Next page: