Which will legally declare, construct, and initialize an array?

A int myList = {};
B int myList = (5, 8, 2);
C int myList = {4,9,7,0};
D int myList = {4, 3, 7};

Correct Answer: int myList = {4, 3, 7};

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 uses 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.

Related Questions

The rules of baseball state that a batter Legally Completes His Time at Bat when he is put out or becomes a base runner. Which situation below is the best example of a batter Legally Completing His Time at Bat?
Which exception is thrown when an array element is accessed beyond the array size?
Which array function checks if the specified key exists in the array?
What array will you get if you convert an object to an array?
What is the name given to the software which can be legally compiled and often used for free?
Which former president of America legally adopted his surname from his stepfather?
If you have a Green Card, You can stay in USA legally. If the statement above is true, which of the following must also be true?

Next steps