day09--继承的格式和基本使用

This commit is contained in:
xx
2026-09-23 10:23:55 +08:00
parent f0dd070448
commit fd795f7375
7 changed files with 76 additions and 0 deletions
@@ -0,0 +1,9 @@
package com.inmind.extends01;
public class Teacher extends Employee{
//默认无参构造,所有类都有构造方法
public void teach(){
System.out.println("老师在教学生学java");
}
}