Single Choice
Not Set
QWhich will legally declare, construct, and initialize an array?
ID: #1982
Java Language Fundamental
1,592 views
Question Info
#1982Q ID
Not SetDifficulty
Java Language FundamentalTopic
Your Answer
Choose the Best Option
Click any option to instantly check if you're correct.
Correct Answer
Explanation
The only legal array declaration and assignment statement is Option D
Option A is wrong because it initializes an int array with String literals.
Option B is wrong because it use something other than curly braces for the initialization.
Option C is wrong because it provides initial values for only one dimension, although the declared array is a two-dimensional array.
Continue Practice
Share
Share This Question
Challenge a friend or share with your study group.
More from This Topic