[Java] 자바의 정석 기초편 ch7-17~20 제어자, static, final, abstract
ch7-17 제어자(modifier) - 클래스와 클래스의 멤버(멤버 변수, 메서드)에 부가적인 의미 부여 접근제어자 public, protected, (default), private 그 외 static, final, abstract, native, transient, synchronized, volatile, strictfp - 하나의 대상에 여러 제어자를 같이 사용가능 ( 접근제어자는 4개 중에 1개만 붙임 ) public class ModifierTest { public static final int WIDTH = 200; public static void main(String[] args) { System.out.println("WIDTH=" + WIDTH); } } ch7-18 static -..
2022. 6. 15.