int[]?nums?=?{3,5,7,5,5};
???? ??int?i=0;
???? ??for(int?ea:nums){
???? ??????System.out.println(ea);
???? ??????nums[i]?=?i+1;
???? ??????System.out.println("數(shù)組中的"+i+"值:"+nums[i]);?//輸出1,2,3,4,5
???? ??????i++;?
???? ??????//System.out.println("數(shù)組中的"+i+"值:"+nums[i]);?輸出3,5,7,5,5
???? ??}
把輸出語(yǔ)句放在自增前后,num[i]的值為什么會(huì)不一樣?
錯(cuò)過(guò)了年華
2017-03-30 17:53:20