int[] ary = {95, 86, 73, 42, 92, 96};
int[] ary = new int[6];
int[] ary = new int[]{95, 86, 73, 42, 92, 96};複製代碼
int[] ary = {95, 86, 73, 42, 92, 96};
int length = ary.length;
int e0 = ary[0];複製代碼
int[] ary = {95, 86, 73, 42, 92, 96};
for (int i=0; i<ary.length; i++){
… …
}複製代碼
int[] ary = {95, 86, 73, 42, 92, 96};
ary = Arrays.copyOf(ary, ary.length+1);複製代碼
能夠將答案代碼,寫入留言區,代碼要不斷的編寫纔會培養「碼感」的呦!你不關注一下嗎?
編程