Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Do const & goto keyword?

 
Amit Goyal
Ranch Hand
Posts: 95
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Do the "const" and "goto" come under heading of keywords?
As I am aware of, these two are just reserved word not keywords.



Regards,

Amit Goyal
 
Damodar Mukhopadhyay
Ranch Hand
Posts: 98
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yau are right. They are resurve key words.
 
Aniket Patil
Ranch Hand
Posts: 218
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Paul Lachance
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
for the purposes of the exam i would consider them keywords (they shouldn't be used as identifiers!)
 
Barry Gaunt
Ranch Hand
Posts: 7729
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Paul Lachance:
for the purposes of the exam i would consider them keywords (they shouldn't be used as identifiers!)


That's right, if they are in a list of possible answers then I would select them as being Java keywords.
[ January 16, 2007: Message edited by: Barry Gaunt ]
 
Amit Goyal
Ranch Hand
Posts: 95
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Guys!


Regards,

Amit Goyal
 
ram gaurav
Ranch Hand
Posts: 208
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Like const , goto , we also have true,false,null as reserved.
 
Aniket Patil
Ranch Hand
Posts: 218
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Like const , goto , we also have true,false,null as reserved.

They are called 'manifest constants'.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic