文章目录 一、数组的定义 一、数组的定义 public class Test { public static void main(String[] args) { /* 不能像c语言一样 */ //! int a[20]; /* 直接赋值 */ int b[] = {0,1,2,3}; /* 指定行数列数 */ int c[][]; c = new int[2][3]; /* 不等长数组 */ int[][] d; d = new int[2][]; d[0] = new int[2]; d[1] = new int[3]; } }