The Java Tutorial


Trail Map
Your guide to The JavaTM Tutorial

You can begin reading the tutorial sequentially, or visit only those trails that interest you. If you have questions about the tutorial (how to download it, when it was updated, how to give us feedback...), go to the tutorial's first page.

The tutorial's trails fall into three categories:

Trails Covering the Basics

Most, if not all, programmers need to know about the APIs
discussed in these trails and lessons.

Getting Started     TOC ]

Start here to write, build, and run your first Java application and applet.

  • The Java Phenomenon
  • The "Hello World" Application
  • The "Hello World" Applet
  • Common Problems (and Their Solutions)
  • Learning the Java Language     TOC ]

    Learn the language from variables, expressions, and flow-control to objects, classes, and interfaces.

  • Object-Oriented Programming Concepts
  • The Nuts and Bolts of the Java Language
  • Objects and Classes in Java
  • More Features of the Java Language
  • Common Problems (and Their Solutions)
  • Writing Applets     TOC ]

    Wanna spice up your web pages with applets? Discover what applets can, cannot, and should not do.

  • Overview of Applets
  • Taking Advantage of the Applet API
  • Practical Considerations of Writing Applets
  • Finishing an Applet
  • Common Problems (and Their Solutions)
  • Essential Java Classes     TOC ]

    Find out how to use the classes in the JDK API that you are most likely to use in your Java programs.

  • Using String and StringBuffer
  • Setting Program Attributes
  • Accessing System Resources
  • Handling Errors with Exceptions
  • Doing Two or More Tasks at Once: Threads
  • Reading and Writing (but no 'rithmetic)
  • Creating a User Interface     TOC ]

    Put a face on your program with the classes in the AWT and Swing.

  • Overview of the Java UI
  • Using Components, the GUI Building Blocks
  • Using the JFC/Swing Packages
  • Laying Out Components Within a Container
  • Working with Graphics
  • Custom Networking     TOC ]

    Write programs that communicate with resources and other programs on the network.

  • Overview of Networking
  • Working with URLs
  • All About Sockets
  • All About Datagrams
  • To 1.1--And Beyond!     TOC ]

    Learn what's new in 1.1 and upcoming in 1.2, and how to convert programs from 1.0 to 1.1.

  • What's New in 1.1
  • Migrating to 1.1
  • A Preview of Things to Come
  •  

    Trails for Specialized Tasks

    Many, but not all, programmers need the APIs
    covered by these trails and lessons.

    Collections     TOC ]
        by Joshua Bloch

    Use Java's collection framework to store and manipulate groups of related objects; it can can make your programs smaller, faster, and more reusable.

  • Introduction
  • Interfaces
  • Implementations
  • Algorithms
  • Custom Implementations
  • Interoperability
  • Internationalization     TOC ]
        by Dale Green

    Write programs for the global market. After internationalization, your software can support new languages and cultures without changes to the source code.

  • Introduction
  • Setting the Locale
  • Isolating Locale-Specific Data
  • Formatting
  • Working with Text
  • JavaBeans: Components for the Java Platform     TOC ]
        by Andy Quinn

    Learn how to develop platform-independent components in the Java programming language. This trail covers JavaBeans basics, the BeanBox, and the Beans Development Kit (BDK).

  • JavaBeans Concepts and the Beans Development Kit
  • Using the BeanBox
  • Writing a Simple Bean
  • Properties
  • Manipulating Events in the BeanBox
  • The BeanInfo Interface
  • Bean Customization
  • Bean Persistence
  • New Features
  • Security in JDK 1.2     TOC ]
        by Mary Dageforde

    Learn how the built-in security features protect you from malevolent programs. See how to use tools for controlling access to resources, generating and checking digital signatures, and creating and managing keys needed for signature generation and checking. See how to incorporate security checks and cryptography services into your programs.

  • Security Features Overview
  • Quick Tour of Controlling Applets
  • Quick Tour of Controlling Applications
  • API and Tools Use for Secure Code and File Exchanges
  • Signing Code and Granting It Permissions [Tools]
  • Exchanging Files [Tools]
  • Generating and Verifying Signatures [API]
  • Implementing Your Own Permission
  • Summaries
  • Security in JDK 1.1     TOC ]
        by Mary Dageforde

    See how to use the JDK Security API introduced in this release to generate and verify digital signatures.

  • Java Security API Overview
  • Using the Security API to Generate and Verify a Signature
  • Servlets     TOC ]
        by Cynthia Bloch

    Learn how to use the Servlet API to extend the functionality of your server.

  • Overview of Servlets
  • Interacting with Clients
  • The Servlet Life Cycle
  • Saving Client State
  • The servletrunner Utility
  • Running Servlets
  • Programming with Java IDL     TOC ]
        by Jim Inscore

    Java IDL provides CORBA-compliant interoperability for programs written in Java. This trail gives you an overview of CORBA and takes you through the steps to building a CORBA-compatible client/server combination with Java IDL.

  • Introducing Java IDL
  • The Hello Client/Server Example
  • The JAR File Format     TOC ]
        by Alan Sommerer

    Bundle a Java program and its resources into an easily downloadable, secure archive.

  • Using JAR Files: The Basics
  • Signing and Verifying JAR Files
  • Using JAR-related APIs Introduced in 1.2
  • The Java Extension Mechanism     TOC ]
        by Alan Sommerer

    Expand the functionality available to your programs by using the extension mechanism, a standard, scalable way to make custom APIs available to all applications running on the Java platform.

  • Creating and Using Extensions
  • Setting Extension Security Privileges
  • Using the JNI     TOC ]
        by Beth Stearns

    Use the Java Native Interface API to retain your investment in code written in other languages. The JNI lets you integrate native methods written in C or C++ with Java programs.

  • Overview of the JNI
  • Writing Java Programs with Native Methods
  • Integrating Java and Native Programs
  • Interacting with Java from the Native Side
  • Invoking the Java Virtual Machine
  • Summary
  • The Reflection API     TOC ]
        by Dale Green

    Learn how to dynamically create objects, invoke methods, access fields, and examine classes.

  • Examining Classes
  • Manipulating Objects
  • Working with Arrays
  • Summary of Classes
  • Reference Objects     TOC ]
        by Monica Pawlan

    Maintain a reference to an object after the object becomes eligible for garbage collection to interact with the garbage collector in limited ways.

  • Understanding Garbage Collection
  • All About Reference Objects
  •  

    Comprehensive Examples

    All programmers can benefit from looking at
    large, real-world examples.

    Putting It All Together     TOC ]

    Explore a comprehensive example in depth to learn about the organization and interaction of the components of a Java program.

  • BINGO!
  •  
    All of the material in The Java Tutorial is copyright-protected and may not be published in other works without express written permission from Sun Microsystems.