看看下面这块代码输出的值是多少?
public class Static_Test {
public static void main(String args[]) {
int count = 0;
int num = 0;
for (int i = 0; i <= 100; i++) {
num = num + i;
count = count++;
}
System.out.println(count * num);
}
}
原本我以为是 510050, 实际上
是0.
count == count++;
//VS
count++;













网友评论