[이것이자바다] chapter . reserved word(예약어)
reserved word(예약어)
아래의 reserved word(예약어)로 변수이름을 만들면 컴파일 오류가 나기 때문에 주의하자.
| 분류 | 예약어 |
|---|---|
| primitive type | boolean, byte, char, short, int , long , float, double |
| 접근 지정자 | private, protected , public |
| 클래스와 관련 | class, interface , abstract, extends, implements, enum |
| 객체와 관련 | new, instanceof, this, super, null |
| 메소드와 관련 | void, return |
| 제어문과 관련 | if, else, switch, case, default, for, do, while, break, continue |
| 논리값 | true, false |
| 예외 처리와 관련 | try, catch, finally, throw, throws |
| 기타 | import, synchronized, native, final, static, package, volatile, assert, transient, strictfp |