一个Java程序就是一个具有main方法的类。例如:
public class helloworld{ public static void main(String[] args){ System.out.println("hello world!"); } }
Java程序先被编译成字节码,然后由Java虚拟机解释执行。程序中类的定义应该在一个独立的文件中,而且文件的名字应该和类的名字一样。
Find recent content on the main index or look in the archives to find all content.