class MainDemo{
public static void main(String args[]){
float arrayOne[] = {1, 2, 3, 4,5};
for(int iIndex=0; iIndex<arrayOne.length; iIndex++)
{
arrayOne[iIndex] = iIndex;
iIndex=iIndex+1;
}
for(int iIndex=0; iIndex<arrayOne.length; iIndex++)
{
System.out.println(arrayOne[iIndex]);
}
}
}
为什么是输出?
0.0
2.0
2.0
4.0
4.0
代替
0.0
1.0
2.0
3.0
4.0