Previous | Next | Trail Map | Writing Java Programs | Table of Contents


Writing Java Programs

The Writing Java Programs trail covers everything you need to know about the Java language. In addition, some of the lessons describe the use of classes in the java.lang package.

Object-Oriented Programming Concepts: A Primer cuts through the hype surrounding object-oriented technology and teaches you its core concepts: objects, messages, classes and inheritance. It's important to understand these key concepts before delving into the specifics of the Java language. This lesson also contains a bibliography for further reading on the subject. Feel free to skip this lesson if you are already familiar with object-oriented programming.

The Nuts and Bolts of the Java Language introduces you to several components of the Java language by explaining a simple Java application line by line. You will learn about the syntax and semantics of the Java language, plus several features of the Java programming environment.

Objects, Classes, and Interfaces takes the concepts you learned in Object-Oriented Programming Concepts: A Primer and walks you through how to make use of those concepts in the Java language. You will learn how to create, use and destroy objects, how to write your own classes, including information about writing methods and creating subclasses, and you will learn how to create and use interfaces. This lesson is a complete do-it-yourself "Object-Oriented Programming in Java" lesson.

The String and StringBuffer Classes illustrates how to manipulate character data using the String and StringBuffer classes. Through this lesson you will also learn about accessor methods and how the compiler uses Strings and StringBuffers behind the scenes.

Setting Program Attributes describes how you can set attributes for your Java programs through the use of properties and command line arguments. Use properties to change attributes for every invocation of your program; use command line arguments to change attributes only for the current invocation of your program.

Using System Resources shows you how your Java programs can access system resources (such as standard I/O, array copying and property management) through the Java development environment's System class. The System class provides a system-independent programming interface to system resources allowing your programs to use them without compromising portability.

Threads of Control discusses in detail the use of threads that enable your Java applications or applets to perform multiple tasks at the same time. This lesson describes when and why you might want to use threads, shows you how to create and manage threads and thread groups in your Java program, and shows you how to avoid common pitfalls such as deadlock and race conditions.

Handling Errors using Exceptions explains how you can use Java's exception mechanism to handle errors in your programs. In this lesson you will learn what an exception is, how to throw and catch exceptions, what to do with an exception once you've caught it, and how to best use the exception class hierarchy provided by the Java development environment.

Input and Output Streams begins with a description of your likely first encounter with Java input and output (I/O) streams. Then this lesson provides an overview of the InputStream and OutputStream family of classes. From there, this lesson provides many examples of how you to use the most "popular" I/O streams, including two examples on how to write your own filtered streams.


Previous | Next | Trail Map | Writing Java Programs | Table of Contents