Java keyword

A Java keyword is one of 50 reserved terms that have a special function and a set definition in the Java programming language. The fact that the terms are reserved means that they cannot be used as identifiers for any other program elements, including classes, subclasses, variables, methods and objects.

Keywords in the Java programming language

(See some examples of keyword functions below the table.)

abstract continue for new switch
assert default goto package synchronized
boolean do if 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

 A few examples of Java keyword functions:

The abstract keyword, placed before class, prevents that class from being directly instantiated.

The assert keyword, placed before a true or false statement known as a predicate, indicates that the programmer believes the statement to always be true. If it proves otherwise, an assertion exception occurs.

The const keyword defines a variable or pointer as unchangeable.


This was last updated in July 2016

Next Steps

Why we use static final in Java for constants

Why the const keyword in Java is not implemented

Continue Reading About Java keyword

Dig Deeper on Development tools for continuous software delivery

App Architecture
Software Quality
Cloud Computing