**int类型没有赋值默认为 0 **
public class ArrayDemo03 { public static void main(String[] args) { //静态初始化:创建 + 赋值 int[] a = {1,2,3,4,5,6,7,8}; System.out.println(a[0]); System.out.println("=============="); //动态初始化:包含默认初始化 int[] b = new int[5]; b[0] = 1; b[1] = 10; b[2] = 11; b[3] = 12; for ( int i = 0; i < b.length; i++ ) { System.out.println(b[i]); } } }