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.



     
    ASPTreeView.com
     
    Evaluation has №ґНХєЦЕНЙРexpired.
    Info...