2014年2月15日 星期六

First hello world

from "http://docs.oracle.com/javase/tutorial/index.html"


class HelloWorldApp {
    public static void main(String[] args) {
        System.out.println("Hello World!"); // Display the string.
    }
}
 
 
1. class named HelloWorldApp
2. public static void main(String[] args)
   "public static" 可以交換順序,一般寫為public static
   args 為 arguments (?),一般寫為args或argv
   基本的main
3. String[] args (不確定,這邊說ignore augrments)
4. System.out.println 輸出文字指令
 

沒有留言:

張貼留言