J2EEOnline J2EE   





Java Certification  «Prev  Next»
Variable declarations - Quiz
Each question is worth one point. Select the best answer or answers for each question.
 

1. Which array declarations are equivalent to the following?
String[][] s;

Please select all the correct answers.
  A. String[]s[];
  B. String s[][];
  C. String[][s];
  D. String [ ] [ ] s;


2. What is the value of a[1] as the result of the following array declaration?
int [] a = {1,2,3,4,5};

Please select all the correct answers.
  A. 0
  B. 1
  C. 2
  D. null

3. Which of the following statements about declaring variables, arrays, and classes are true?
Please select all the correct answers.
  A. A field variable may be declared final.
  B. A local variable may be declared final.
  C. An array may be declared final.
  D. A class may be declared final.