标签:第一个 数组 应用程序 class 字符 main函数 title str new
使用外部方法时(不管是static还是非static),都要先new一个对象,才能使用该对象的方法。
eg:
Employee employee = null;错误
Employee employee = new Employee(); 正确
在java中为什么要把main方法定义为一个static方法?
标签:第一个 数组 应用程序 class 字符 main函数 title str new
原文地址:http://www.cnblogs.com/zedosu/p/6605809.html