public class MultiplicationTable { //----------------------------------------------------------------- // Creates a 2D array of integers, fills it with values from // the multiplication table from 1 to 12, then prints them out. //----------------------------------------------------------------- public static void main (String[] args) { final int N_ROWS=12; int[][] table = new int[N_ROWS][12]; // Load the table with values for (int row=0; row < table.length; row++) for (int col=0; col < table[row].length; col++) table[row][col] = (row+1) * (col+1); // Print the table for (int row=0; row < table.length; row++) { for (int col=0; col < table[row].length; col++) System.out.print (table[row][col] + "\t"); System.out.println(); } } }