Review Questions

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 (/* ... */) ...

Get Programmer's Guide to Java™ Certification, A: A Comprehensive Primer, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.