File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Mock Exam Errata and the fly likes Is true, false a keyword Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Mock Exam Errata
Bookmark "Is true, false a keyword" Watch "Is true, false a keyword" New topic
Author

Is true, false a keyword

Jyotsna Umesh
Ranch Hand

Joined: May 09, 2001
Posts: 94
Few Java books say that true, false and null should be treated as keywords for certification exam purpose otherwise these are reserved words. Is it true?
Thanx
Jyotsna
Vanitha Sugumaran
Ranch Hand

Joined: Apr 11, 2001
Posts: 356
Hi,
-----------------------
from Java Language Specification
While true and false might appear to be keywords, they are technically Boolean literals (�3.10.3). Similarly, while null might appear to be a keyword, it is technically the null literal (�3.10.7).
----------------------------
hope this helps,
Vanitha.
Jyotsna Umesh
Ranch Hand

Joined: May 09, 2001
Posts: 94
hi vanitha,
Thanks for clearing the matter but if the question is
Select the keywords in the given list
1. null
2. implements
3. throws
4. true
Then should I select all the four answers?
Thanks
Jyotsna

Percy Densmore
Ranch Hand

Joined: Mar 06, 2001
Posts: 214
Hi Jyotsna,
1. null
2. implements
3. throws
4. true
Your list of words above are all included in the latest list of keywords and other reserved words. The latest one added is 'strictfp'. Hope that clears it up for you.
Percy
Jane Griscti
Ranch Hand

Joined: Aug 30, 2000
Posts: 3141
JLS §3.9 lists all the legal keywords. If the word is not on the list, then it's not a keyword.
<code>true, false</code> and <code>null</code> are not on the list
Hope that helps.
------------------
Jane Griscti
Sun Certified Programmer for the Java� 2 Platform


Jane Griscti
SCJP, Co-author Mike Meyers' Java 2 Certification Passport
Jyotsna Umesh
Ranch Hand

Joined: May 09, 2001
Posts: 94
Originally posted by Jane Griscti:
JLS �3.9 lists all the legal keywords. If the word is not on the list, then it's not a keyword.
<code>true, false</code> and <code>null</code> are [b]not
on the list
Hope that helps.
[/B]

Thanks for clearing it, even i know these words are reserve words not kewords but am puzzled to read Philip's book that saya
treat these reserved words as key words for certification exam, is he wrong in saying this?
Thanx
Jyo
Vanitha Sugumaran
Ranch Hand

Joined: Apr 11, 2001
Posts: 356
Hi Jyotsna ,
I couldn't answer when you ask whether to select or not? try this link,
http://www.javaranch.com/ubb/Forum24/HTML/000801.html
Vanitha.
Jyotsna Umesh
Ranch Hand

Joined: May 09, 2001
Posts: 94
Originally posted by Vanitha Sugumaran:
Hi Jyotsna ,
I couldn't answer when you ask whether to select or not? try this link,
http://www.javaranch.com/ubb/Forum24/HTML/000801.html
Vanitha.


Thanks Vanitha for the link but again they haven't reached at any final point, still its not clear to me whether i should select all options or not, How would you choose the options, please let me know, becoz this basic question has puzzled me in many mock exams, some treat these words as reserved, some as key words?
Jyotsna
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Is true, false a keyword