| 123456789101112131415161718192021222324 |
- package course.polymorphism;
- /**
- * @author WanJl
- * @version 1.0
- * @title Teacher
- * @description
- * @create 2026/7/24
- */
- public class Teacher extends Person{
- @Override
- public void eat() {
- System.out.println("教师吃饭...");
- }
- @Override
- public void sleep() {
- System.out.println("教师睡觉...");
- }
- public void play(){
- System.out.println("教师玩....爽....");
- }
- }
|