Some identifiers are reserved to associate some functionality or to represent values, such type of reserved identifiers are called “ReservedWords”.
- Reserved Words For DataTypes.
byte
short
int
long
float
double
boolean
char
- Reserved Words For Flow Controls.
if
else
switch
case
default
while
do
for
break
continue
return
if
else
switch
case
default
while
do
for
break
continue
return
- Reserved Words For Modifiers.
public
private
protected
final
abstract
static
native
synchronized
volatile
transient
strictfp
- Reserved Words For ExceptionHandling.
try
catch
finally
throw
throws
assert
- Class Related Keywords.
class
interface
package
extends
implements
import
- Object Related Keywords.
new
instanceof
super
this
- Reserved literals
true
false
null
NB:
void return type keyword.
In java return type is mandatory, if a method does not return anything such type of methods we should declare with the void return type.
public
private
protected
final
abstract
static
native
synchronized
volatile
transient
strictfp
- Reserved Words For ExceptionHandling.
try
catch
finally
throw
throws
assert
- Class Related Keywords.
class
interface
package
extends
implements
import
- Object Related Keywords.
new
instanceof
super
this
- Reserved literals
true
false
null
NB:
void return type keyword.
In java return type is mandatory, if a method does not return anything such type of methods we should declare with the void return type.
void return type keyword.
In java return type is mandatory, if a method does not return anything such type of methods we should declare with the void return type.