개인 메서드를 재정의 할 수 없으면 followng 코드가 오류를 나타내지 않는 이유는 무엇입니까? 대신 출력을 생성합니다.개인 메서드 재정의
class A {
private void fun() {
System.out.println("ths is a private method");
}
}
class B extends A {
void fun() {
System.out.println("ths is wrng");
}
}
class C {
public static void main(String args[]) {
B ob = new B();
ob.fun();
}
}