day09-继承中成员变量的访问特点

This commit is contained in:
2026-01-22 13:55:04 +08:00
parent 9f7546ccd5
commit c10a3501ab
6 changed files with 50 additions and 0 deletions

View File

@@ -2,4 +2,7 @@ package com.inmind.extends01;
public class Assistant extends Employee{
public void help() {
System.out.println("在生活上帮助学生");
}
}

View File

@@ -2,4 +2,7 @@ package com.inmind.extends01;
public class BanZhuRen extends Employee {
public void manage() {
System.out.println("在学校管理学生");
}
}

View File

@@ -3,4 +3,7 @@ package com.inmind.extends01;
public class Teacher extends Employee{
public void teach() {
System.out.println("老师在上课了");
}
}