O'Reilly logo

Programmer's Guide to Java™ Certification, A: A Comprehensive Primer, Second Edition by Rolf W. Rasmussen, Khalid A. Mughal

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Review Questions

2.7 Which of the following lines are valid declarations?

Select the three correct answers.

  1. char a = '\u0061';

  2. char 'a' = 'a';

  3. char \u0061 = 'a';

  4. ch\u0061r a = 'a';

  5. ch'a'r a = 'a';

2.8 Given the following code within a method, which statement is true?
int a, b;
b = 5;

Select the one correct answer.

  1. Local variable a is not declared.

  2. Local variable b is not declared.

  3. Local variable a is declared but not initialized.

  4. Local variable b is declared but not initialized.

  5. Local variable b is initialized but not declared.

2.9 In which of these variable declarations will the variable remain uninitialized unless explicitly initialized?

Select the one ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required