1.doSomething是void的,没有输出,不能用print2.main方法是静态方法,不能直接调用非静态方法
return type void?What you want to print?
main方法里面写这个 把你报错的sout删掉
Person1 person = new Person1(); person.doSomething();