About Our Examples

The Java Tutorial contains hundreds of complete working examples. Some of our examples are applets, others are standalone applications. For a complete list of the tutorial's applets, and what page to visit to run each one, refer to List of Applets.

This page contains four sections that discuss various aspects of our examples:

Example Directory Names

Each lesson in the tutorial contains one or more programming examples, each of which can be composed of one or more files. A lesson groups its examples in sub-directories according to the version of the Java 2 SDK required and whether Swing is required.

A lesson might have one or more of the following example directories (from most up-to-date to least):

Example Directory Name Java 2 SDK Release/Version Other libraries
example-1dot4 Java 2 SDK 1.4  
example-1dot3 Java 2 SDK 1.3  
example-1dot2 Java 2 SDK 1.2  
example-swing JDK 1.1 JFC/Swing 1.1
example-1dot1 JDK 1.1  
example JDK 1.0.2  

Multiple Versions of the Same Program

Often, you can find multiple versions of the same program by looking in each of the example directories in a lesson. For example, you might find a JDK 1.0.2 version of a program in example and a JDK 1.1 version of the same program in example-1dot1.

We provide multiple versions of the same program for several reasons:

About the Applets Running in our Pages

Throughout the tutorial, you will encounter running applets. Our pages use the APPLET tag, which (for applets that use API introduced after 1.1, at least) requires Java Plug-in version 1.3.1 or greater. Most applets are followed by a note like this:

Note: If you don't see the applet running above, you need to install Java Plug-in, which happens automatically when you install the J2SE JRE or SDK. We strongly recommend that you install the latest version; at least 1.3.1 is required for all our applets. You can find more information in the Java Plug-in home page.