Author Topic:   Keywords and Reserved words
posted February 20, 2000 09:15 PM           
Which are java keywords
NULL //false
null ??
main ??
extends //true

ranch hand
posted February 20, 2000 09:47 PM         
Only extends is a java keyword.

uday krishna
posted February 21, 2000 02:18 AM             
null is also a reserved word.

posted February 21, 2000 08:11 AM           
null is given as a reserved word
where as main is not a keyword

so should i include null when they ask ques like this???

Tony Alicea
posted February 21, 2000 10:39 AM             
Yes, you should include null.

maha anna
posted February 21, 2000 02:19 PM             
refer to this page from Sun's tutorial

goto - Keyword
const - Keyword
strictfp - Keyword
null/true/false - NOT keywords


[This message has been edited by maha anna (edited February 21, 2000).]

Tony Alicea
posted February 21, 2000 08:03 PM             
And the exam also says that inner classes can be static. But they cannot as per the spec.

Sun is not consistent. If you don't mark null as a Java keyword, you will get the question wrong.

posted June 24, 2000 07:44 PM           
I see you've argued this point in several posts. You are saying even though Sun mentions specifically that keywords are a subset of the reserved words (as are the special literals null, true and false) in both the jls
and the nuts&bots tutorial as well as many books, the exam expects the test taker to think keywords and reserved words are the same? They may all not be usable as variable names but they are distinctly different. Would it be correct to say that you believe the test is wrong?