This question is in regard to the mock exam at http://18.104.22.168/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.
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.
Pounding at a thick stone wall won't move it, sometimes, you need to step back to see the way around.