• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Is null a keyword?

 
Gundi Krueger
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In the "Complete Java2 Certification Study Guide" from 1999 on page 6 of chapter 1 there is a list of Java keywords. Included in this list is the term null
On the mock exam CD coming with the book, it is asked if null is a keyword, and it is wrong to say it is not.
In other mock exams the term null is NOT a keyword. So you are wrong if you follow the official guide. We checked various books today but didn't come to any conclusion. It seems they can't decide if it is or if it isn't.
Similar with volatile. Some books mention them as reserved, some not at all (Java2), some say it is a keyword. Which book am I to trust regarding the exam?
 
Justin Moore
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
null, true and false are not keywords, they are reserved literals
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
true,false,null are not Java Keywords, they are reserved
words.U can check keywords at Sun site. And volatile is
also keyword.
 
GVS
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here is a link on the Sun web site containing a list of keywords.
http://java.sun.com/docs/books/tutorial/java/nutsandbolts/_keywords.html
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic