Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

keywords vs. reserved words

 
Christy Smith
Greenhorn
Posts: 26
  • 0
  • Mark post as helpful
  • send pies
  • 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,
 
Cameron Park
Ranch Hand
Posts: 371
  • 0
  • Mark post as helpful
  • send pies
  • 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.
 
Guoqiao Sun
Ranch Hand
Posts: 317
  • 0
  • Mark post as helpful
  • send pies
  • 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.

 
Jane Griscti
Ranch Hand
Posts: 3141
  • 0
  • Mark post as helpful
  • send pies
  • 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
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic