IntelliJ Java IDE
The moose likes Mock Exam Errata and the fly likes Mughal's mock exam erratum Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Professional Certification » Mock Exam Errata
Reply Bookmark "Mughal Watch "Mughal New topic
Author

Mughal's mock exam erratum

Panagiotis Varlagas
Ranch Hand

Joined: Nov 27, 2000
Posts: 233
Mughal's mcok exam has the following erratum:
QUESTION:
Which are valid identifiers:
(a) class
(b) $value$
(c)zer@
(d)angstroem
(e)2much
It specifies the correct answer as being (a), (b) and (d).
However class is not an identifier as per $3.8 of the JLS:
"An identifier cannot have the same spelling (Unicode character sequence) as a keyword, boolean literal, or the null literal."
class being a keyword and given the above quote from JLS it follows that class in not an identifier. Hence the answer claimed to be correct actually is not, the correct answer being (b) and (d).
Panagiotis.

bill bozeman
Ranch Hand

Joined: Jun 30, 2000
Posts: 1070
I agree with you. class is a keyword so you can't use it for variable or method names.
vishad patel
Greenhorn

Joined: Dec 05, 2000
Posts: 17
I am also agree with you.
bye.
vishad patel
Jane Griscti
Ranch Hand

Joined: Aug 30, 2000
Posts: 3141
Ditto. 'class' is definitely a keyword.
------------------
Jane
The cure for boredom is curiosity.
There is no cure for curiosity.
-- Dorothy Parker


Jane Griscti
SCJP, Co-author Mike Meyers' Java 2 Certification Passport
 
IntelliJ Java IDE
 
subject: Mughal's mock exam erratum
 
Threads others viewed
Erratum?
Yet another erratum
S & B SCJP 6 - C7 - Q4 erratum
K &B Erratum? Regarding generics
Mughal's mock exam erratum
MyEclipse, The Clear Choice