Why does this program print out i = 1 when i originally equals 0?

前端 未结 0 1071
-上瘾入骨i
-上瘾入骨i 2021-01-12 08:58

Consider this code:

public class Increment {
    public static void main(String[] args) {
        int i = 0;
        i = i++ +i; 
        System.out.println(&         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题