akios @ ウィキ
3.9. キーワード
最終更新:
akios
-
view
3. 字句構造
3.1. Unicode
3.2. 字句変換
3.3. Unicodeエスケープ
3.4. 行終端子
3.5. 入力要素とトークン
3.6. 空白
3.7. コメント
3.8. 識別子
3.9. キーワード
ASCII文字で記述された50の文字列がキーワード(keyword)として使用するために予約されており、識別子には使用できません。
Keyword: one of
abstract continue for new switch
assert default if package synchronized
boolean do goto private this
break double implements protected throw
byte else import public throws
case enum instanceof return transient
catch extends int short try
char final interface static void
class finally long strictfp volatile
const float native super while
abstract continue for new switch
assert default if package synchronized
boolean do goto private this
break double implements protected throw
byte else import public throws
case enum instanceof return transient
catch extends int short try
char final interface static void
class finally long strictfp volatile
const float native super while
キーワードとしてconstとgotoが予約されていますが現在は使用されていません。このようなC++のキーワードがプログラム中に現れた場合に、Javaコンパイラーはより適切なエラーメッセージを出力するようにこれらを使用しています。