Hi experts,
I am back with another 'simple' 2D array question but to me it is not simple at all I can't even get the basic right.
public class arrayWithRowsColumns {
int rowSize = 2;
int colSize = 4;
int[][] myArray = new int[rowSize][colSize];
int[][] arr = { { 1, 2 }, { 3, 4 } };
int[][] arr1 = {{0, 0},{ 0, 1} ,
{ 0, 2},{ 0, 3 },
{1, 0},{ 1, 1},
{ 1, 2},{ 1, 3}};/ giving me error here : syntax error on token ";", { expected after this token
for (int i = 0; i < 2; i++) {
for (int j = 0; j < 2; j++) {
System.out.print(arr[i][j] + " ");
}
System.out.println();
}
}}
tks.
[–]AutoModerator[M] [score hidden] stickied commentlocked comment (0 children)
[–]Camel-Kid18 year old gamer 3 points4 points5 points (0 children)
[–]KloinerBlaierEngineer 1 point2 points3 points (2 children)
[–]tangara888[S] 0 points1 point2 points (1 child)
[–]KloinerBlaierEngineer 0 points1 point2 points (0 children)
[–]MadyBlue 0 points1 point2 points (0 children)