显示Exception in thread "main" java.lang.Error: Unresolved compilation problem: The method Person() is undefined for the type Demo1
要求让我们把方法和运行分开写,但是出错了。
public class Person {
System.out.print("我是李华");
}
public class Demo1 {
public static void main(String[] args) {
Person();
}
}