System.out.println(b.teach() b.study());错误1.b是老师没有study2.b.teach()返回void同理a(?).study()void没有void void的运算3.System.out.println不能传入参数void改为b.teach();a.study();
System.out.println(b.teach() b.study());
改为
a.study();b.teach();