• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Keyword vs Reserved Word!

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 132
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
ok well said.
Best of luck for your exam.
reply
    Bookmark Topic Watch Topic
  • New Topic