Here's a list of Java's keywords. These words are reserved--you cannot use
any of these words as names in your Java programs. true
, false
, and null
are not keywords but
they are reserved words, so you cannot use them as names in your programs
either.
Java Keywords
|
|||||
abstract |
boolean |
break |
byte |
case |
catch |
char |
class |
|
continue |
default |
do |
double |
else |
extends |
final |
finally |
float |
for |
|
if |
implements |
import |
instanceof |
int |
interface |
long |
native |
new |
null |
package |
private |
protected |
public |
return |
short |
static |
super |
switch |
synchronized |
this |
throw |
throws |
transient |
try |
void |
volatile |
while |
assert |
enum |
strictfp |
|
|
|
The words with asterisks are reserved and not currently used. Note that all of the keywords are in lowercase, thus for is a keyword but FOR is not.