Although you can view the example source code online, by following the
links below, I recommend that you download the complete set of examples
so that you can work with them on your computer locally. They are
available as a
or as a
gzipped tar file.
If you find any bugs in these examples, please send e-mail describing
the bug to firstname.lastname@example.org.
If you have found a workaround to the problem, please include it.
The examples were written by David Flanagan, and are Copyright (c) 1997
by O'Reilly and Associates.
You may study, use, and modify these examples for any purpose. This
means that you can use the examples, or modified versions of the
examples in your programs, and you can even sell those programs. You
can distribute the source code to these examples, but only for
non-commercial purposes, and only as long as the copyright notice is
retained. This means that you can make them available on a public Web
site, for example, but that you cannot include them on a commercial
CD-ROM without the prior permission of O'Reilly and Associates.
Note that these examples are provided AS-IS, with absolutely NO WARRANTY
of any kind, either expressed or implied.
an applet of intermediate complexity, used as an example in the
an application that demonstrates how to define, throw, and handle
exceptions. This application doesn't do anything other than print out
some text, but you might want to study it and play around with it to
learn more about how exceptions work in Java. See the usage instructions
in the source code.