Java Keywords

Reserved Keywords in Java

Keywords are special tokens in the language which have reserved use in the language. Keywords may not be used as identifiers in Java.You cannot declare a field whose name is a keyword, for instance.


Below are all the Java language keywords:

abstract assert
boolean break

byte case
catch char
class const
continue default
do double
else enum

extends final
finally float
for goto
if 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

  • goto and const - are not used
  • enum - is present since Java 5.0
  • strictfp - is present since Java 1.2
  • assert - is present since Java 1.4
In addition, the identifiers null, true and false denote literal values and may not be used to create identifiers.

Popular posts from this blog

Naming Conventions

if..else..if Loader

Nested if..else Statement