Fund. CS II (CS152 2005S)

Class 04: An Introduction to Java (1)

Back to An Introduction to Unix. On to An Introduction to Java (2).

Held: Friday, January 28, 2005

Summary: Today we begin our exploration of Java with a simple program.

Related Pages:

Assignments

Notes:

Overview:

Some Basics of Java

Detour: Packages

Java in the MathLAN

Your First Java Program

package rebelsky.introjava;

public class First
{
  public static void main(String[] args)
    throws Exception
  {
    java.io.PrintWriter pen;
    pen = new java.io.PrintWriter(System.out, true);
    java.lang.String greeting;
    greeting = "Hello";
    pen.println(greeting);
  } // main(String[])
} // class First

Let's deconstruct this program

Back to An Introduction to Unix. On to An Introduction to Java (2).

Disclaimer: I usually create these pages on the fly, which means that I rarely proofread them and they may contain bad grammar and incorrect details. It also means that I tend to update them regularly (see the history for more details). Feel free to contact me with any suggestions for changes.

This document was generated by Siteweaver on Wed May 11 10:55:44 2005.
The source to the document was last modified on Mon Jan 24 10:17:06 2005.
This document may be found at http://www.cs.grinnell.edu/~rebelsky/Courses/CS152/2005S/Outlines/outline.04.html.

You may wish to validate this document's HTML ; Valid CSS! ; Check with Bobby

Samuel A. Rebelsky, rebelsky@grinnell.edu