好好學習.天天向上

嶺南大學社區學院 資訊科技、數學及科學組

Archive for September 10th, 2007

ISM001 Class Summary (1)

without comments

Dear students of ISM001,

In our first class of ISM001 last Friday, we went through a few simple Java programs (click for example, or see the following):

 1 // Fig. 2.1: Welcome1.java
 2 // Text-printing program.
 3 
 4 public class Welcome1
 5 {
 6    // main method begins execution of Java application
 7    public static void main( String args[] )
 8    {
 9       System.out.println( "Welcome to Java Programming!" );
10 
11    } // end method main
12 
13 } // end class Welcome1

It is important that students review the processes involved in writing, compiling and running a Java program. In summary, by the next class students should know how to:

  1. Write a Java program using a text editor such as Notepad, Notepad++, vim, emacs, etc. (I will tell you how to use other advanced IDEs such as JBuilder in the later part of the course.)
  2. Use various different methods to print something to the screen, including println, print, and printf. Also understand the use of \n and \t, etc. in these printing statements.
  3. Use the command javac at DOS command prompt to compile the Java program. You need to have Java SE (or other similar packages) installed in your computer.
  4. Use the command java at DOS command prompt to run the Java bytecode. You need to have a Java runtime environment (available in Java SE) installed in your computer.

The course website has the necessary reference resources for you. However, you are also suggested to read Chapter 2 of the textbook to make sure that you don’t miss anything.

Next time I would definitely “invite” some brave students to come out and demonstrate the above. We will then look at two more examples in Chapter 2 and proceed to Chapter 3 to talk about classes and objects, the building blocks of an object-oriented program.

Good luck.

Written by 張真人

September 10th, 2007 at 12:07 am

Posted in Class summary, ISM001

Close
E-mail It