java中间缓存变量机制

package Interview;

/**
 * Created by Jackson on 2017/9/18 10:55
 * 因为java引入了中间缓存变量的机制,所以,j=j++可以换成如下写法
 * temp=j;
 * j=j++;
 * j=temp;
 * 所以程序最终输出结果为 0
 */
public class interview {
    public static void main(String[] args){
        int j = 0;
        for(int i = 0;i < 100; i++){
            j=j++;
        }
        System.out.println(j);
    }
}
拼了命、尽了兴
原文地址:https://www.cnblogs.com/zj-phper/p/7542230.html