Hel java | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Hel java

int[][] r = new int[2]; Answer: Invalid int[] x = new int[]; Answer: Invalid What is the correct , i just know it’s not correct

19th Sep 2021, 6:13 AM
STOP
STOP - avatar
1 Answer
+ 1
You need to specify dimension of the array int[ ] [ ]= new int[ 3 ][ 5 ]; // 3 rows, with 5 columns each int[ ] x = new int[ 10 ]; // 1 row of 10 columns
19th Sep 2021, 6:51 AM
Ipang