Essentials of the Java Programming Language, Part 1
By Monica Pawlan
March 1999
If you are new to programming in the Java language, have some experience with other languages, and are familiar with things like displaying text or graphics or performing simple calculations, this tutorial could be for you. It walks through how to use the Java® 2 Platform software to create and run three common types of programs written for the Java platformapplications, applets, and servlets.
You will learn how applications, applets, and servlets are similar and different, how to build a basic user interface that handles simple end user input, how to read data from and write data to files and databases, and how to send and receive data over the network. This tutorial is not comprehensive, but instead takes you on a straight and uncomplicated path through the more common programming features available in the Java platform.
If you have no programming experience at all, you might still find this tutorial useful; but you also might want to take an introductory programming course. Also see the Step-by-Step Programming section in the New-to-Java Programming Center.
Essentials of the Java Programming Language: A Hands-On Guide
Contents
Lesson 1: Compiling and Running a Simple Program
- A Word About the Java Platform
- Setting Up Your Computer
- Writing a Program
- Compiling the Program
- Interpreting and Running the Program
- Common Compiler and Interpreter Problems
- Code Comments
- API Documentation
- More Information
Lesson 2: Building Applications
Lesson 3: Building Applets
Lesson 4: Building a User Interface
- Swing APIs
- Import Statements
- Class Declaration
- Global Variables
- Constructor
- Action Listening
- Event Handling
- Main Method
- Applets Revisited
- More Information
Lesson 5: Writing Servlets
Lesson 6: File Access and Permissions
- File Access by Applications
- Exception Handling
- File Access by Applets
- Granting Applets Permission
- Restricting Applications
- File Access by Servlets
- Appending
- More Information
Lesson 7: Database Access and Permissions
- Database Setup
- Create Database Table
- Database Access by Applications
- Database Access by Applets
- Database Access by Servlets
- More Information
Lesson 8: Remote Method Invocation