What are the Java keywords?
Author: Deron Eriksson
Description: This Java tutorial lists the Java keywords.
Tutorial created using: Windows XP || JDK 1.6.0_10


JavaSW 1.6 has the following keywords:

Java Keywords

abstract assert boolean break byte case catch char class const
continue default do double else enum extends final finally float
for if goto implements import instanceof int interface long native
new package private protected public return short static strictfp super
switch synchronized this throw throws transient try void volatile while

Java also features a few literals, which look like keywords but are not keywords. We have a "null" literal and the boolean literals, "true" and "false". Additionally, note that "goto" and "const" are keywords, even though they aren't currently used in Java.

The Java keyword list changes very rarely, but it can change. For example, "enum" was added with Java 1.5. As a result of this, if you wrote an application under Java 1.4 that used a variable called "enum", you would need to change the name of this variable if you migrated your code to Java 1.5 or above.