n=n++;
1。
public static void cycleTest(){
int n =0;
for(int i=0;i<5;i++)
n=n++;
System.out.println("n="+n);
}
运行结果为:n=0
2。
public static void cycleTest(){
int n =0;
for(int i=0;i<5;i++)
n++;
System.out.println("n="+n);
}
运行结果为:n=5
3。
public static void cycleTest(){
int n =0;
for(int i=0;i<5;i++)
n=++n;
System.out.println("n="+n);
}
运行结果为:n=5
原因:
so help me to get where i belong......i love u...forever....


评论