java中多维数组得动态初始化与静态初始化
package mazhengting;
import java.util.Arrays;public class Arrayss { public static void main(String args[]) { //多维数组的动态初始化 int[][] a = new int[3][]; a[0] = new int[] {5,6,7}; a[1] = new int[] {1,2}; a[2] = new int[] {1,2}; for(int[] c:a) System.out.println(Arrays.toString©); //多维数组的静态初始化 int[][] b = {{1,2,3},{2,3},{5,6}}; for(int[] d:b) System.out.println(Arrays.toString(d)); }}