File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Reserved word and Key word Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Reserved word and Key word" Watch "Reserved word and Key word" New topic

Reserved word and Key word

Parameswaran Thangavel
Ranch Hand

Joined: Mar 01, 2005
Posts: 485
whats the difference between the reserved word and keyword.
Ram Naresh

Joined: Mar 28, 2005
Posts: 11
similarity is that both cannot be used as identifiers, difference is that reserved words like goto were not consider safe to use, so cannot be used. there are close substitutes like break,continue with labels for goto and public static final instead of const.

[ April 09, 2005: Message edited by: Ram Naresh ]
Raghu Shree
Ranch Hand

Joined: Mar 18, 2005
Posts: 143
key words are nothing but reserve words. we can't use this as a identifiers for variable name,class name, method name etc., But one slight different between keyword and reserve word. goto and const are not keyword. if we use this compiler shows an error message. but we can't use this as a identifier. These type of words are called reserve words.

Raghu J<br />SCJP 1.4<br /> <br />The Wind and waters are always<br />on the side of the ablest navigators.<br /><a href="" target="_blank" rel="nofollow">SCJP Group</a><br /><a href="" target="_blank" rel="nofollow">SCWCD Group</a>
I agree. Here's the link:
subject: Reserved word and Key word
It's not a secret anymore!