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


Writing Java Programs

The Writing Java Programs series 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 all 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 Anatomy of a Java Application talks about the components of a stand-alone Java program in the context of a small application that prints the current date and time. Through this lesson, you will see classes and objects, two fundamental building blocks of object-oriented programming, in action within the context of a Java program.

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 that 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.

Command Line Arguments shows you how to accept and process arguments provided on the command line to a Java application. Note that the Java interpreter only passes command line arguments to Java applications--applets use parameters instead. For more information about applet parameters, see Defining and Using Applet Parameters(in the Writing Applets trail)

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 discusses 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 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