public final static String str = "STR_VAL"; // 변경할 수 없는 상수
public void test(final String str){} // 메서드 바디안에서 str 변수를 변경 할 수 없음. ex) str = "test"; 시 컴파일 에러

public final void finalTest(){}
public final class FinalClass{}
는 상속시 변경할 수 없음.

+ Recent posts