import element.*; import structure.*; public class Mult { public static void main2() { // table is an array of arrays of ints int[] table[] = new int[10] []; int i; // now, allocate each of the 20 element rows for (i = 0; i < table.length; i++) { table[i] = new int[20]; } for (int r = 0; r < 10; r++) { Assert.condition(table[r].length == 20, "rows right length"); for (int col = 0; col < 10; col++) { table[r][col] = 2; } } } public static void main(String args[]) { DrawingWindow d = new DrawingWindow(); ConsoleWindow c = new ConsoleWindow(); int table[][] = new int[10][20]; for (int r = 0; r < 10; r++) { Assert.condition(table[r].length == 20, "rows right length"); for (int col = 0; col < 10; col++) { table[r][col] = 2; } } int row, column; for (row = 0; row < 10; row++) { for (column = 0; column < 20; column++) { table[row][column] = row * column; } } c.out.println("table has "+table.length+" rows"); c.out.println("table has "+table[0].length+" columns"); for (row = 0; row < table.length; row++) { for (column = 0; column < table[row].length; column++) { //... table[row][column] = row * column; } } main2(); System.exit(0); } }