Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

keywords vs reserved words

 
Suresh
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi buddies,
What actually is the difference between keywords and reserved words?
Java tutorial says 'true, false and null' are not key words but are reserved words. It says you can't use both reserved as well as keywords as identifiers.

Thanks in advance,
Regards,
Suresh.
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
What you are saying is absolutly correct that keywords as well as reserved words we should not use it for identifiers.
To me I could differentiate only one thing. The reserved words 'true', 'false' and 'null' are values. I mean like numbers, alphabets for human's these are values for computers.
I guess so... don't worry much about this. But you should know which is keyword and which one is reserved words. That's all needed for the exam.
thanks,
Surya K
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
FYI,
There are 50 keywordand other reserved words that should not be used as identifers.
Note:
goto & const are reserved works with no meaning at the present time for jdk 1.2
Source:
SYBEX Java 2 Certification Study Guide page 6.

[This message has been edited by monty6 (edited May 30, 2000).]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic