상속 INHERITANCE_Part2
·
Programing/JAVA
final final 변수 : 변수값 변경불가 - 상수 final 메서드 : 오버라이딩 불가 final 클래스 : 상속 불가 final 메서드 : 오버라이딩 불가 class MethodSuper{ final void superMethod(){ System.out.println("super method"); } } class MethodChild extends MethodSuper{ void superMethod(){ System.out.println("child method"); } } public class FinalMethod{ public static void main(String[] args) { // TODO Auto-generated method stub } } final 클래스 : 상속 불가..