Java Reference
In-Depth Information
Summary of Key Concepts
Errors and exceptions are objects that represent unusual or invalid
processing.
The messages printed when an exception is thrown provide a method call
stack trace.
Each catch clause handles a particular kind of exception that may be
thrown within the try block.
The finally clause is executed whether the try block is exited normally
or because of a thrown exception.
If an exception is not caught and handled where it occurs, it is propagated
to the calling method.
A programmer must carefully consider how and where exceptions should
be handled, if at all.
A new exception is defined by deriving a new class from the Exception
class or one of its descendants.
The throws clause on a method header must be included for checked
exceptions that are not caught and handled in the method.
A stream is a sequential sequence of bytes; it can be used as a source of
input or a destination for output.
Three public reference variables in the System class represent the standard
I/O streams.
Output file streams should be explicitly closed or they may not correctly
retain the data written to them.
The Java class library contains many classes for defining I/O streams with
various characteristics.
Tool tips and mnemonics can enhance the functionality of a graphical user
interface.
Components should be disabled when their use is inappropriate.
A combo box provides a drop down menu of options for the user.
A scroll pane is useful for viewing large objects or large amounts of data.
A split pane displays two components side by side or one on top of the
other.
Search WWH ::




Custom Search