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( ); } } }

8/21/2016 7:28:18 AM

Anshul Rawal

1 Answer

New Answer

+1

just deleted the ; for both for loops