Author Topic:   null , true , false
eram
ranch hand
posted March 15, 2000 02:45 PM             
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 ?

Tony Alicea
sheriff
posted March 15, 2000 03:45 PM             
You R Right.

maha anna
bartender
posted March 15, 2000 03:51 PM             
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

Rolf Weasel
ranch hand
posted March 15, 2000 04:04 PM             
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 at the sun site.

Rolf Weasel
ranch hand
posted March 15, 2000 04:08 PM             
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
sheriff
posted March 15, 2000 05:05 PM             
Rolf, Maha: The exam wants RESERVED words only.

eram
ranch hand
posted March 15, 2000 06:06 PM             
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
sheriff
posted March 15, 2000 06:34 PM             
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

Jim Yingst
sheriff
posted March 15, 2000 07:41 PM             
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.

|