• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Devaka Cooray
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Martijn Verburg
  • Frits Walraven
  • Himai Minh

null , true , false

 
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
From exam point of view:
what are null , true , false ?
1. keywords in java.
2. reserved words in java.
I think reserved words.
Am i wrong ?
 
Desperado
Posts: 3226
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You R Right.
 
Ranch Hand
Posts: 1467
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Tony,
Since you have already taken the exam, if the qstn asks to pick up keywords, if true , false, null also present among the given answers , should we pickup true, false, null as keywords.
Please answer from the exam point of view. I know it's been going on for a long time. I want to make a full stop here. I was thinking of sending a mail to Sun itself. What do you say?
regds
maha anna
 
Ranch Hand
Posts: 82
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
these are reserved words.
null is a null literal. it is the only null literal.
true and false are boolean literals.
u can find the list of keywords here at the sun site.
 
Rolf Weasel
Ranch Hand
Posts: 82
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Maha Anna,
i think if the question specifically states keywords, true, false and null should not be included. The JLS stresses that these are not keywords:
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).
see the link in my previous reply.

 
Tony Alicea
Desperado
Posts: 3226
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Rolf, Maha: The exam wants RESERVED words only.
 
eram
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hey! hey!
Where does JLS say that null, true and flase are 'reserved' or any other such wording.
JLS has only used 'keywords' and then 'boolean literals' and 'null literal'.
SO where is the point of mentioning as reserved words or for that matter use any other wording to describe null, false and true.
I hope u guys are getting what i am saying.
LET me make it clear - the above question is wrong .
Am i right Tony ?
null - null literal
fasle & true - boolean literals
That is it , do not use any such wording as 'reserved'.
Please do correct me If I am wrong.
Thanks.
 
Tony Alicea
Desperado
Posts: 3226
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
eram: Go ahead and answer anything you want on the real exam. This topic has come up too many times already. I'll let others fight about it
 
Wanderer
Posts: 18671
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The consensus has been, from people who have taken the exam and scored very highly, and also from some people involved in creating the exam: The exam does not care about the difference between keywords and reserved words. Even if you see the phrase "keyword" in a question (and I suspect that's really only in sample questions anyway, not real exam questions) then you should just pretend that they said "reserved word" instead. And no, "reserved word" isn't defined in the JLS - if you insist, you can replace it with "keyword or boolean literal or null literal" instead. "Reserved word" seems easier though.
Yes, in the real world, null, true, and false are not technically keywords, they are literals. But for the exam, just pretend that they are. We'll all be a lot happier.
 
Why fit in when you were born to stand out? - Seuss. Tiny ad:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic