Chapter 1

Introduction


Chapter Goals

Prerequisites

What is a computer?

Central Processing Unit

Schematic Diagram of a Computer

Programming Languages

The  Java Programming Language

Applets on a Web Page



Becoming Familiar with your Computer

A Shell Window


An Integrated Development Environment


File Hello.java

1
public class Hello
2
{
3
   public static void main(String[] args)
4
   {
5
      // display a greeting in the console window
6
      System.out.println("Hello, World!");
7
   }
8
}

A simple program

Syntax 1.1: Method Call

 
object.methodName(parameters)

Example:

 
System.out.println("Hello, Dave!");

Purpose:

To invoke a method of an object and supply any additional parameters

Compiling and Running

From Source Code to Running Program


Errors

The Edit-Compile-Test Loop