CSC108 Lecture #1 - First Version of the Library Program


A Complete Program

Let's continue with our library book example.
Here's a complete program that prints a message to the output:

// first version of the book program
public class Library {
   public static void main (String[] args) {
      System.out.println ("Reading is Wonderful!");
   }
}

Notice that there aren't any actual Book objects in this program. The whole point of our examle is to get you started with object-oriented programming, so this example is not much of a help yet.

The next program example will create actual Book objects.


[ Home | Outline | Announcements | Newsgroup | Assignments | Exams | Lectures | Links ]


U of T IMAGE

© Copyright 2000. All Rights Reserved.