Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and medical aesthetics - Which statement correctly declares a two-dimensional integer array?
Which statement correctly declares a two-dimensional integer array?
Let me analyze it for you.

First of all, a is wrong, because the length of this array should be specified during declaration and initialization. In the JAVA language, this two-dimensional array is actually a reference to several one-dimensional array variables, so the length must be specified in the first bracket of the new statement.

B is obviously wrong. When defining a two-dimensional array, the first two brackets indicate the type and cannot have a value.

C is correct

D is incorrect, because two-dimensional arrays are references to several one-dimensional arrays, so there must be two parentheses outside the variable name.

E's mistake, I believe you can see it. You cannot put variable names in parentheses.

Now give you a general formula, so that you can make a good judgment in the future:

Data type array variable name [] [] = new data type [length] [fixed length or indefinite length];

Great, isn't it?