What is the difference between keywords and reserved words in Java?



Keywords

Keywords in Java convey a special meaning to the compiler therefore, these cannot be used as identifiers. Java provides a set of 50 keywords.

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 long strictfp volatile
const float native super while

Reserved words

Among the list of key words list mentioned above the key words goto and const are currently not in use. They are reserved words (for the future use).

Updated on: 2020-02-18T11:11:37+05:30

696 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements