The JavaTM Tutorial
Previous Page Start of Tutorial > Start of Trail Search
Feedback Form

Trail: Essential Java Classes: Table of Contents

Handling Errors with Exceptions
What Is an Exception?
The Catch or Specify Requirement
Catching and Handling Exceptions
The try Block
The catch Block(s)
The finally Block
Putting It All Together
Specifying the Exceptions Thrown by a Method
How to Throw Exceptions
Chained Exceptions
Creating Your Own Exception Classes
Unchecked Exceptions — The Controversy
Advantages of Exceptions
Summary
Questions and Exercises: Exceptions
Threads: Doing Two or More Tasks At Once
What Is a Thread?
Using the Timer and TimerTask Classes
Implementing a Thread
Subclassing Thread and Overriding run
Implementing the Runnable Interface
The Life Cycle of a Thread
Thread Scheduling
Synchronizing Threads
The Producer/Consumer Example
Locking an Object
Reaquiring a Lock
Using the notifyAll and wait Methods
Running the Producer-Consumer Example
Explicit Locks and Condition Variables
Synchronized Data Structures
Starvation and Deadlock
Thread Pools
Threads Summary
Questions and Exercises: Threads
I/O: Reading and Writing (but no 'rithmetic)
Overview of I/O Streams
Using the Streams
How to Use File Streams
How to Use Pipe Streams
How to Wrap a Stream
How to Concatenate Files
Working with Filter Streams
How to Use DataInputStream and DataOutputStream
How to Write Your Own Filter Streams
Object Serialization
Serializing Objects
Providing Object Serialization for Your Classes
Working with Random Access Files
Using Random Access Files
Writing Filters for Random Access Files
And the Rest . . .
Summary
Questions and Exercises: I/O: Reading and Writing (but no 'rithmetic)
Setting Program Attributes
Using Properties to Manage Program Attributes
Command-Line Arguments
Accessing System Resources
Using the System Class
The Standard I/O Streams
System Properties
Forcing Finalization and Garbage Collection
Providing Your Own Security Manager
Introducing the Security Manager
Writing a Security Manager
Installing Your Security Manager
Deciding What SecurityManager Methods to Override
Miscellaneous System Methods
The Runtime Object

Previous Page Start of Tutorial > Start of Trail Search
Feedback Form

Copyright 1995-2005 Sun Microsystems, Inc. All rights reserved.