|Start of Tutorial||
This trail discusses classes from the Java platform that are essential to most programmers. It focuses on classes in the
java.iopackages, including these:
Threadand its related classes
Exception, and their friends
java.ioand their descendants
Handling Errors Using Exceptions explains how you can use Java's exception mechanism to handle errors in your programs. This lesson describes what an exception is, how to throw and catch exceptions, what to do with an exception once you've caught it, and how to best use the exception class hierarchy provided by the Java platform.
Threads: Doing Two or More Tasks at Once discusses in detail the use of threads that enable your Java applications or applets to perform multiple tasks simultaneously. This lesson describes when and why you might want to use threads, how to use timers to schedule tasks, how to create and manage threads and thread pools in your Java program, and how to avoid common pitfalls such as deadlock, starvation, and race conditions.
I/O: Reading and Writing describes the process of getting information into your program and sending it out again through the use of the stream classes in
java.io. Reading and writing information provides the basis for all kinds of interesting behaviors, such as serializing objects, communicating over a network, or just accessing the file system.
Setting Program Attributes describes how you can set attributes for your Java programs through the use of properties and command-line arguments. Use properties to change attributes for every invocation of your program; use command-line arguments to change attributes for only the current invocation of your program.
Accessing System Resources shows you how, through the
Systemclass, your Java programs can manage properties, set up a security manager, and access system resources such as the standard input and output streams. The
Systemclass provides a system-independent programming interface to system resources, thus allowing your programs to use them without compromising portability. This lesson also contains a brief discussion of the
Runtimeclass and why most programmers should avoid using it.
|Start of Tutorial||
Copyright 1995-2005 Sun Microsystems, Inc. All rights reserved.