Answer to Question #146462 in Programming & Computer Science for Joshua

Question #146462
which of the following is a best way of declaring x as a two-dimension array in java?
a.int[2] x = new int[];
b.int[]x = new int[2];
c.int[10][20] x = new int[20][10];
d.int[][] x = new int[10][20];
1
Expert's answer
2020-12-02T14:56:09-0500

A two-dimensional array in java can be declared as follows: int[][] x = new int[10][20];

Therefore, the answer is d).

Answer:

d. int[][] x = new int[10][20]


Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS