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
posted
0
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
posted
0
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
posted
0
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
posted
0
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
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
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