MultiDim1.java
Select all
/* MultiDim1.java David Klick CIS 260 2/2/2005 Demonstration of using multidimensional arrays. */ public class MultiDim1 { public static void main(String[] args) { int[][] a = new int[2][3]; System.out.println("Length of a: " + a.length); System.out.println("Length of a[0]: " + a[0].length); System.out.println("Length of a[1]: " + a[1].length); int[][] b = { {1, 2, 3}, {4, 5} }; System.out.println("Length of b: " + b.length); System.out.println("Length of b[0]: " + b[0].length); System.out.println("Length of b[1]: " + b[1].length); for (int i=0; i