| Author |
is "const" and "goto" are keywords?
|
Anil Kumar Saha
Ranch Hand
Joined: Apr 07, 2004
Posts: 111
|
|
Dear Ranchers, Is const,goto are keywords ro reserved words?Are these valid in JDK 1.4? Regards, Anil Kr. Saha Research Consultant IIT Kharagpur India
|
Regards,
Anil Kumar Saha
SCJP 1.4
http://www.agilej.blogspot.com/
|
 |
navneet shrivastava
Ranch Hand
Joined: Jul 09, 2004
Posts: 39
|
|
Is const,goto are keywords ro reserved words?Are these valid in JDK 1.4? --------------------------------------------- Nav: yes, the both are. const has been added since in 1.3.
|
+nav
|
 |
Barry Gaunt
Ranch Hand
Joined: Aug 03, 2002
Posts: 7729
|
|
This is what the Java Language Specification (section 3.9) says:
The keywords const and goto are reserved, even though they are not currently used. This may allow a Java compiler to produce better error messages if these C++ keywords incorrectly appear in programs.
|
Ask a Meaningful Question and HowToAskQuestionsOnJavaRanch
Getting someone to think and try something out is much more useful than just telling them the answer.
|
 |
sura watthana
Ranch Hand
Joined: Sep 13, 2004
Posts: 77
|
|
|
'const' and 'goto' are reserved keywords not currently in use in JDK 1.4
|
 |
Anil Kumar Saha
Ranch Hand
Joined: Apr 07, 2004
Posts: 111
|
|
|
So, from SCJP point of view,const and goto are keywords?
|
 |
Barry Gaunt
Ranch Hand
Joined: Aug 03, 2002
Posts: 7729
|
|
|
Yes
|
 |
marc weber
Sheriff
Joined: Aug 31, 2004
Posts: 11343
|
|
See... http://java.sun.com/docs/books/tutorial/java/nutsandbolts/_keywords.html
|
"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummer
sscce.org
|
 |
Anil Kumar Saha
Ranch Hand
Joined: Apr 07, 2004
Posts: 111
|
|
Thanks all of you for clearing my doubt
|
 |
 |
|
|
subject: is "const" and "goto" are keywords?
|
|
|