Review Questions


graphics/rq_icon.gif
2.1

Which of the following is not a legal identifier?

Select the one correct answer.

  1. a2z

  2. dipus

  3. 52pickup

  4. _class

  5. ca$h

  6. total#

2.2

Which statement is true?

Select the one correct answer.

  1. new and delete are keywords in the Java language.

  2. try , catch , and thrown are keywords in the Java language.

  3. static , unsigned , and long are keywords in the Java language.

  4. exit , class , and while are keywords in the Java language.

  5. return , goto , and default are keywords in the Java language.

  6. for , while , and next are keywords in the Java language.

2.3

Is this a complete and legal comment?

 /* // */ 

Select the one correct answer.

  1. No, the block comment ( /* ... */) is not ended since the single-line comment ( // ... ) comments out the closing part.

  2. It is a completely valid comment. The // part is ignored by the compiler.

  3. This combination of comments is illegal and the compiler will reject it.



A Programmer[ap]s Guide to Java Certification
A Programmer[ap]s Guide to Java Certification
ISBN: 201596148
EAN: N/A
Year: 2003
Pages: 284

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net