2011年12月22日星期四

第5天第2节: 第一个Java程序

==CLASSPATH sets the dir where java searches class files.

1) You may want to add "." into it
2) You may want to add .jar file 

==Declare class in the source file
1) public class Hello  => filename must be Hello.java
    Only one public class per file
2)            class Helloa => filename could be Hello.java, and the output is Helloa.class
    Could have multiple classes per file, but ouputs multiple correspondong .class files

==Naming rules
First letter of class name must capital

没有评论: