keyword : Java Glossary

go to home page K words local find full screen, hide local find menu Google search web for more information on this topic jump to foot of page translate this page with Babelfish by Roedy Green ©1996-2009 Canadian Mind Products
index page for letter ⇒ punctuation 0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z (all)
keyword
Java reserves some words. They cannot be used as variable, method or class names.
Java Keywords
abstract do import public throws
boolean double instanceof return transient
break else int short try
byte extends interface static void
case final long strictfp volatile
catch finally native super while
char float new switch  
class for package synchronized  
continue if private this  
default implements protected throw  
Reserved keywords (not currently in use)
const goto      
Reserved Literals
null true false    
assert arrived with JDK 1.4. enum arrived with JDK 1.5. Const and goto are not currently used. They may be there just in case C++ programmers use them by mistake to enable the compiler to give a more meaningful error message.

What keywords Can Be Applied to What

  variable local variable method class inner class code block
public
protected
private
abstract 1
static ²
final 3 4 4
native 5
synchronized
volatile 6
transient
strictfp

Notes

1 - abstract methods cannot have a body.

² - static blocks may not occur inside methods.

3 - final methods cannot be overridden in a subclass. This is not the same as C++ const.

4 - you can’t derive from a final class.

5 - implemented in some other language, usually C, C++ or assembler.

6 - May be asynchronously modified by other threads. Volatile is not a substitute for task synchronization.

Table composed by Razvan.

Learning More

Sun’s Javadoc on the Modifier class : available:

CMP homejump to top
CMP logo
feedback Please email your feedback for publication, errors, omissions, broken/redirected link reports
and suggestions to improve this page to Roedy Green : feedback email
made with CSS
HTML Checked!
ICRA ratings logo
mindprod.com IP:[65.110.21.43]
Your face IP:[38.103.63.58]
You are visitor number 56,131.
You can get a fresh copy of this page from: or possibly from your local J: drive (Java virtual drive/mindprod.com website mirror)
http://mindprod.com/jgloss/keyword.html J:\mindprod\jgloss\keyword.html