This week's book giveaway is in the Java in General forum.
We're giving away four copies of Event Streams in Action and have Alexander Dean & Valentin Crettaz on-line!
See this thread for details.
Win a copy of Event Streams in Action this week in the Java in General forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Knute Snortum
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Ron McLeod
  • Piet Souris
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

mock exam

 
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This question is in regard to the mock exam at http://209.242.122.83/JavaCertification.html
I missed question number 3, which asked you to select the
reserved words in Java from the following list:
Class
goto
continue
const
sizeof
include
I selected only "continue", but the correct answer was
"goto, continue, and const".
My question is, how and where are "goto" and "const"
used in Java. I'm familiar with them in C++,
but have never seen them used in any Java examples
and was unable to find them in any of my Java books.
Any help is appreciated.
Thanks.
 
Ranch Hand
Posts: 146
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Stephanie,
Please click on the link below to refer to the complete list of keywords in Java. http://java.sun.com/docs/books/tutorial/java/nutsandbolts/_keywords.html
Hope this helps!!
Regards,
Milind
 
Ranch Hand
Posts: 300
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you are right they are not used in java but they are reserved words which means you cant use them as identifiers
if you read the question again it doesnt ask for key words it asked for reserved words
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for all the help!
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the certification site. If u have got any other links with mock exams. Please let me know.
 
Ranch Hand
Posts: 3143
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
goto and const were made reserved word just in case the Java designers decided to use them in a later version of Java, they havn't yet but hwo knows. In the meantime they have been made reserved words so that people don't use them as identifiers in their code, since this could become a problem if they do become included in later versions of Java.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!