W***o 发帖数: 6519 | 1 我觉得我的理解是对的,我刚才写了下面这个代码测试了一下我的猜测:
public class plustest
{
public static void main(String[] args)
{
int[] a = new int[] {1, 2, 3, 4, 5};
System.out.println("Before i++:");
int i = 2;
a[i++] = 100;
System.out.println("i is now: " + i);
for(int e : a)
{
System.out.println(e);
}
int j = 2;
a[++j] = 200;
for(int f : a)
{
System.out.println(f);
}
}
... 阅读全帖 |
|