• 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

keywords vs. reserved words

 
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, All
Does the certification exam test about reserved words at all?
I believe that reserved words and keywords are different, right?
also is strictfp a reserved words?
Thanks,
 
Ranch Hand
Posts: 371
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
reserved words are words that Java reserved that programmers can't use as identifiers. keywords are a subset of reserved words that are actually used in Java. Examples of reserved words that are not keywords are goto, const.
No, strictfp is neither a reserved word not a keyword.
 
Ranch Hand
Posts: 317
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, Cameron, <code>strictfp</code> is a keyword. You can test it with compiler.
Regards,
Guoqiao

Originally posted by Cameron Park:
reserved words are words that Java reserved that programmers can't use as identifiers. keywords are a subset of reserved words that are actually used in Java. Examples of reserved words that are not keywords are goto, const.
No, strictfp is neither a reserved word not a keyword.


 
Ranch Hand
Posts: 3141
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Christy,
The objectives state you'll be tested on keywords and identifiers. All the keywords are listed in JLS §3.9. Note that goto, const and strictfp ARE keywords. They cannot be used as identifiers.
The words true, false and null are not keywords. They are literals AND you cannot use them as identifiers.
You need to be able to identify keywords; usually having to select valid or invalid keywords from a list. You also may see questions asking you to identify legal and illegal identifiers.
Hope that helps.
------------------
Jane Griscti
Sun Certified Programmer for the Java� 2 Platform
reply
    Bookmark Topic Watch Topic
  • New Topic