-
动态初始化(初始化时就指定了数组长度)
int[] array = new int[100];
int[] array;
array = new int[100];
-
静态初始化
int[] array = new int[] {1,2,3};
int[] array;
array = new int[] {1,2,3};
int[] array = new int[100];
int[] array;
array = new int[100];
int[] array = new int[] {1,2,3};
int[] array;
array = new int[] {1,2,3};