Java reserved words

In computer programming, reserved words are those words that are already used by the syntax of that programming language; it can’t be used as identifiers (e.g., name of variable, function name, methods and classes).

Java has its own reserved words. The letters in a reserved word are always in lowercase. They can’t be used for anything other than their intended use.

Some of the reserved words in Java include the following:

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

Note: const and goto are not used in Java anymore, but still they remain as reserved words.

Note 1:

Reserved words for literal values:

false – A boolean literal value.

null – A reference literal value.

true – A boolean literal value.

Comments

comments

Post navigation

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.