Get your CodeRanch badge!*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes is Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "is "const" and "goto" are keywords?" Watch "is "const" and "goto" are keywords?" New topic
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: is "const" and "goto" are keywords?
 
Similar Threads
keywords and reserve words
Question on goto and const
doubt about new reserved keywords
confusion with the question
Is "goto" a Java keyword?