상수와 enum
final : 변수의 값을 변경할 수 없도록 고정 바뀌지 않는 값이라면 인스턴스 변수가 아니라 static을 사용해 클래스 변수로 지정하는 것이 더 좋음 public class ConstantDemo { private final static int APPLE = 1; private final static int PEACH = 2; private final static int BANANA = 3; private final static int APPLE = 4; // 에러 // final은 값을 변경할 수 없도록 하기 때문에 중복 선언을 할 수 없음 public static void main(String[] args) { int type = APPLE; switch(type){ case APPLE: Syst..