• 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

Key words

 
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Which of the following are the valid Keywords?
a) Null
b) True
c) False
d) const
e) goto
f) strictfp
a,b,c are not keywords, but reserved words. But still some books (RHE) put them in the tabular columns of keywords and mention that they are reserved words. So should I select them?
d,e are the keywords not currently in use. As I am going to take exam of SCJP2, should I select them?
f - i have read it somewhere that this one is a new keyword introduced in Java2. Please clarify it.
 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
a,b,c are not keywords as the first letter is capitalized, and the rest ARE keywords. So the answer is:
d,e,f
Note that a,b,c would be part of the answer, if they were all lowercase. Keywords are made up of ALL lowercase letters!!!
 
Ranch Hand
Posts: 3143
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I would include all of them as keywords ... RHE also points out tha the exam questions won't be so ambiguous as to ask you to differentiate between keywords and reserved words.
 
Ranch Hand
Posts: 1492
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Deepak,
For the purposes of the SJCP exam, both keywords and reserved words are keywords. This has been pointed out by people who have taken the test (and passed!) on this and other boards.
Keywords (SJCP): reserved identifiers that are predefined in the language and cannot be used to denote other entities.
NOTE: Unless you typed in the values incorrectly, values in a, b, and c are NOT keywords or reserved words ... all keywords or reserved words have only lower case letters. The only valid keywords (SJCP) are d, e, and f (yes keyword!) in your given list.
Manfred.
 
Deepak Jindal
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks everybody.
Actually I myself framed the question. I should have written Null, True and False in lower case as
null, true, false
Thanks any way for the answers.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic