This week's book giveaway is in the OCMJEA forum. We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line! See this thread for details.
The key here is "keywords" and "reserved words" All keywords are reserved words and you cannot use them as method, class, or variable names. There are 3 other words, null, true, and false, which are not keywords, but are still reserved words. true and false are boolean literals and null is a null literal. There are also 2 words that are keywords but are not used in Java and that is goto and const. So the final answer is yes, goto is a keyword. Bill [This message has been edited by bill bozeman (edited November 22, 2000).]
I don't agree with you that for SJCP goto should be written as a keyword .It is a reserved word and the other reserved words are 'const' 'true' 'false' . So basically all keywords are reserved words and all reserved words may or maynot be keywords and goto is not...
Sorry, but bill is right.... Look at the JLS, chapter 3.9.... Keywords: one of.... const .... goto... Every keyword is a reserved word, including const and goto (this has nothing to do if they are used or not, they are keywords). Reserved word are mostly keywords, BUT there are some, which are NOT keywords BUT reserved... These are the boolean literals true and false and the null literal... hope that helps Oliver