프로그램 언어에서 미리 정의하여 사용하는 단어를 예약어(reserved words)라 한다. 다음은 자바 언어에서 이용하는 48개 예약어를 나타내고 있다.
abstract double int strictfp
boolean else interface super
break extends long switch
byte final native synchronized
case finally new this
catch float package throw
char for private throws
class goto protected transient
const if public try
continue implements return void
default import short volatile
do instanceof static while
[ 그림 7.27 ] 은 C 언어의 예약어로 if와 같이 자바의 예약어와 동일한 것도 많이 있는 것을 알 수 있다.
이러한 기워드는 프로그램 언어에서 문법적인 의미를 갖는다. 우리가 한 언어의 문법을 학습한다는 것은 바로 그 언어의 키워드 사용법을 학습하는 것이다.
auto do goto signed
unsigned break double if
sizeof void case else
int static wolatile char
enum long struct while
const extern register switch
continue float return typedef
degault for short union