day11-final关键字用于修饰方法

This commit is contained in:
2026-05-30 10:32:33 +08:00
parent bdf2351a89
commit 55e81651f1
3 changed files with 36 additions and 0 deletions

View File

@@ -0,0 +1,14 @@
package com.inmind.final_method;
public class Zi extends Fu{
//ctrl+o
/*@Override
public void method() {
//super.method();//调用父类的成员方法,沿用
System.out.println("子类的method方法,重写了父类的功能");
}*/
public void methodZi(){
}
}