[Java] 왜 private 상수는 관습적으로 private static final로 선언할까?2021. 8. 2. 18:57
출처: https://zorba91.tistory.com/275
[Java] 왜 private 상수는 관습적으로 private static final로 선언할까?
private static final과 private final의 차이 public으로 사용하는 상수 타입은 enum을 이용하고 있다. 클래스 내부에서만 간단하게 사용할 상수를 만들 때, 아무 생각 없이 private static final을 사용하고 있..
zorba91.tistory.com
'Development > Java' 카테고리의 다른 글
| [Java] 오류: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights. 해결법 + -- warning-mode all 경고 없애기 (0) | 2021.08.04 |
|---|---|
| [Java] extends, implements 차이 (0) | 2021.08.03 |
| [Java] final 과 static 의 핵심 정리 (0) | 2021.08.02 |
| [Java] super와 부모생성자, 상속(extends, super) (0) | 2021.08.02 |
| [Java] Java 제네릭 Generics (0) | 2021.08.02 |