Sunday, February 8, 2009

Java KeyWords

Some identifiers are reserved in Java which has saparate functionality and meaning such type of reserved indentifiers are called reserved words.
53 reserved words are there in java
50 are keywords-----------48 used keywords,2 unused keywords(goto,const)
3 reserved literals----------true,false,null
Keywords for premitive datatypes:
*byte *short *int *long
*float *double *char *boolean
Keywords for fow control:
*if *else *switch *case *default *for
*do *while *break *continue *return
Keywords for Exception Handling:
*try *catch *finally *throw *throws *assert
Keywords for modifiers:
*public *private *protected *static *abstract *strictfp
*final *transient *native *volitle *synchronised
Class related key words:
*class *interface *package
*extends *implements *import
Object related key words:
*new *instanceOf *super *this
Unused keywords:
*const *goto
class KeyEx1
int goto=10; ←---------------here we will get identifier expected error
Reserved literals:
*true *flase *null
New key words in j2SE 1.5:
All the key words contains only lower case alphabate symbols


Post a Comment