Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Keyword vs Reserved Word!

 
Kasi lingam
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
I am having little bit confusion regarding keywords and reserved words.
If suppose i m getting question like this, what will you choose in SCJP1.4 exam.
Which are the Java Keywords?
1)null
2)const
3)instanceof
4)goto
5)false
I have chosen 2,3,4 as keywords.But const,goto are reserved words.So the answer will be 3 only or all the three.?
And what is the difference between keywords and reserved words.?
Kindly someone explain me clearly..

Regards,
Kasi
 
Karthik Veeramani
Ranch Hand
Posts: 132
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i guess const and goto can be chosen as keywords, bcoz thats the way i saw some books doing (when a question like this is given)... reserved words are those which are not supposed to be used by programmers as variable names etc. they are reserved by java, though not used.
About null, false and true, Sun classifies them as manifest constants and not keywords... to the extent ive seen in books, they are not listed under keywords category at all. So i guess it'll be safe to leave them out and choose the rest of the options... Moreover, the exam objectives clearly state that there wont be questions that deal with these differences (between manifest constants and keywords).
[ April 07, 2003: Message edited by: Karthik Veeramani ]
 
Kasi lingam
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Karthik.
So we can choose reserved words under keywords category right?
It means all reserved words are coming under keyword category.right?(in exam point of view i m asking)
 
Karthik Veeramani
Ranch Hand
Posts: 132
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thats how Ive seen in books And im going to write my exam in a couple of days, and thats wat im going to do
 
Kasi lingam
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ok well said.
Best of luck for your exam.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic