• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

reserved words

 
Val Lee
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
true,false,null is reserved words in Java?
 
veda patil
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
true,false ,null are reserved literals.
 
Jessica Sant
Sheriff
Posts: 4313
Android IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Check out the Java Language Specification --�3.9: Keywords
 
Corey McGlone
Ranch Hand
Posts: 3271
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Val Lee:
true,false,null is reserved words in Java?

For the sake of the SCJP exam, however, you do not need to differentiate between keywords and literals. Just know which words are already reserved for a special purpose. Basically, you can lump literals and keywords together into a master set of "reserved words."
Corey
 
Dan Chisholm
Ranch Hand
Posts: 1865
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Corey,
Although Val didn't mention my mock exam, I assume that he was probably confused by some new questions that were added yesterday. I didn't realize that Sun does not require a person to differentiate between the set of keywords and the set of literals. To clear up the confusion, I changed the wording of the questions to make it obvious that my exam does differentiate between the two. The following is an example of the new wording.

The following words have been selected from the set of java keywords, java literals, and words from other programming languages. Which of these words belong to the set of java keywords?

I also added the following sentence to the remark associated with each answer related to keywords.

Keywords and literals are reserved and can not be used as identifiers.

The answers to the questions remain unchanged.
I agree with Sun in that the most important skill is the ability to recognize which words are reserved by Java and can not be used as identifiers. A Secondary skill is the ability to avoid confusion between Java keywords and familiar keywords from other programming languages such as C, Basic, and Pascal. A less important skill is the ability to understand the technical difference between a keyword and a literal.
I thought about removing the literals from my questions, but there are really only three that cause confusion--true, false, and null. I have come to the conclusion that learning the three is not too difficult.
 
Val Lee
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Thank all's replys
Thank Dan Chisholm's good and hard Mock Exam!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic