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
posted
0
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
posted
0
I am also agree with you. bye. vishad patel
Jane Griscti
Ranch Hand
Joined: Aug 30, 2000
Posts: 3141
posted
0
Ditto. 'class' is definitely a keyword. ------------------ Jane The cure for boredom is curiosity. There is no cure for curiosity. -- Dorothy Parker