A 2d array in
Java (and many other languages) is just an array of 1d arrays. If you think of it as rows and columns, then each row may have the same number of columns, but that's not necessarily true. You get the number of rows by a.length and the number of columns in the second row, for example, as a[1].length. That should be enough for you to finish your assignment.