代码:
System.out.println(a+++b+++a);
System.out.println(a);
System.out.println(b);
运行结果:
分析:
(a+++b+++a) = ((a++)+(b++)+a)=1+1+2
a:1-->2
b:1-->2
代码:
System.out.println((a++)+b+(++a));
System.out.println(a);
System.out.println(b);
运行结果:
分析:
((a++)+b+(++a))=1+1+3
a:1-->2-->3
b:1