Table of Contents

Welcome to

The Java Tutorial

Object-Oriented Programming for the Internet

a practical, online guide
to writing programs in the Java language

This is an online version of The Java Tutorial by Mary Campione and Kathy Walrath--a member of The Java Series.

new The Java Tutorial is now available as an 831 page book! To get your copy check at your local bookstore, or you can order a copy from Addison-Wesley.

Search the Java Tutorial.


Getting Started

The most common Java programs are applications and applets. Applications are standalone programs, such as the HotJava browser. Applets are similar to applications, but they don't run standalone. Instead, applets adhere to a set of conventions that lets them run within a Java-compatible browser. If you're using a browser that can view applets, you should see an animation just below this paragraph -- that's an applet embedded in this HTML page.

The "Hello World" Application -- Start here if you want to create standalone Java applications.
The "Hello World" Applet -- Start here if you are interested in writing applets only.

What Next?

Now that you've seen how to write a Java program, you can proceed with any of the topics below.

Writing Java Programs -- These lessons discuss techniques and concepts that any Java programmer can use. The book version of this tutorial breaks this trail in two:
Writing Applets -- These lessons discuss techniques and concepts that are specific to writing Java applets.
Creating a User Interface -- Here's the information you need to create the user interface of your applet or application.
Custom Networking and Security -- The lessons on this trail teach you how to connect your applications and applets to the information on the Internet! Also, this trail contains a lesson that shows you how you can create an install your own security manager which can help to protect your computer and data from violation.
Integrating Native Methods into Java Programs -- These lessons show you everything you need to know to write native methods in the Java language. A native method is a Java method whose implementation is provided in another programming language such as C. This lesson includes step-by-step instructions and a comprehensive example program.

Table of Contents