Reserved Words

  




What are reserved ?

Some words are reserved to represent some meaningful functionality.

- cat

- fruit

- cow

- car

- sleep

Similarly in java, 

  • If
  • else
  • for

How many words are reserved ?

    In java some words are reserved to represent either meaning or functionality, those words are called as reserved words.
There are 53 reserved words in java.




List of Reserved Java Keywords


Logical Grouping of Keywords


Unused Keywords
goto
    Usage of goto keyword created several problems in old languages like C, C++ etc., hence the use of goto keyword is banned in java.
const
    const was supposed to be used for constant, but we have final keyword for the same and hence const is also unused keyword now.


enum Keyword
An enum is a special "class" that represents a group of constants (unchangeable variables, like final variables).
Reserved Literals
true & false – values for Boolean data type
null – default value for object reference.

Comments