CS 1063 Week 1:  Introduction to Computer Programming

Objectives

Reading Week 1

Administrative


Activity 1:  Compiling a Simple Program

           Complete instructions for JBuilder can be found at  http://www.cs.utsa.edu/~javalab/lab/gettingStartedJbuilder.html

    Part 1:  Setup - Find JBuilder on your computer and execute it.
public class HelloWorld {

      public HelloWorld() {
      }

      public static void main(String[] args) {
        System.out.println("Hello World");
      }

}
    Part 2:  Construction
public static void main(String[] args) {
         .  .  .
}

    public class HelloWorld {

      public HelloWorld() {
      }

      public static void main(String[] args) {
        // display a greeting in the console window
        System.out.println("Hello World");
      }

    }
/* This is a simple Java program
   It will print a greeting to the console
*/
Part 3:  More on the System.out.println statement and strings.  Add the highlighted lines to your HelloWorld file and run.                      Hello
World!

System.out.println("Hello");
System.out.println("World!");




Last  Modified:  January 3, 2007 at 10:28am