Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

is "const" and "goto" are keywords?

 
Anil Kumar Saha
Ranch Hand
Posts: 111
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
navneet shrivastava
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Barry Gaunt
Ranch Hand
Posts: 7729
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
sura watthana
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
'const' and 'goto' are reserved keywords not currently in use in JDK 1.4
 
Anil Kumar Saha
Ranch Hand
Posts: 111
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So, from SCJP point of view,const and goto are keywords?
 
Barry Gaunt
Ranch Hand
Posts: 7729
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes
 
marc weber
Sheriff
Posts: 11343
Java Mac Safari
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
See...

http://java.sun.com/docs/books/tutorial/java/nutsandbolts/_keywords.html
 
Anil Kumar Saha
Ranch Hand
Posts: 111
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks all of you for clearing my doubt
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic