成员方法必须有返回类型即使是没有返回,也要写上void构造函数(方法)没有返回类型,而且和类名一样!一个类里面,一看就知道了譬如:public class Test{public Test(){} //构造函数public Test(int i)(){} //构造函数public void test(){}//public int test2(){}//方法!}
[db:关键字]