Java中数组的默认初始化是什么?
static final int UN = 0;int[] arr = new int[size];for (int i = 0; i < size; i++) { arr[i] = UN;}
int[] arr = new int[5];System.out.println(arr[0]);
... 0
static final int UN = 0;int[] arr = new int[5];System.out.println(arr[0]==UN);
... true
0
慕妹3146593
相关分类