J2EEOnline
J2EEOnline
SiteMap
Java Certification
Java Beans
Java-OO Concepts
Declaring Methods
«Prev
Next»
Java Certification
Java Fundamentals
Automatic Initialization
Identifiers Keywords
Classes Objects
Anonymous Class - Quiz
Java Operators
Java Casting - Quiz
Declaring Java Methods
Declaring Variables
Exception Handling
Garbage Collection
Java Threading Model
Synchronization Concepts -Quiz
Multithreading Theory
Java Array 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.