m1缺少了函数类型,可以写double m1;void表示函数没有返回值,只能修饰寒暑,不能修饰变量。可以写 public void m2() {}或者public Object m2; //如果你希望m2是任意类型的对象的话
double a = 15; int m1=0; void m2();