0
what is wrong with my 2D array code
I made this program to print a 2d array it is not working. why? public class blah2Â { public static void main (String args[]) { int td[][]= new int [4][5]; int i,j,k=0; for (i = 0; i<4;i++) for (j=0; j<5; j++) {td[i][j]=k; k++; } for(i=0; i<4; i++); {for(j=0; j<5; j++); {System.out.print(td[i][j] + " "); }System.out.println( ); } } }
1 Answer
+ 1
just deleted the ; for both for loops