肯定是不一样的,你看一下这段程序
class Test {
public static void main(String[] args) {
int a = 5;
int b = 6;
int i = 5;
int j = 6;
if (a++ > 5 & b++ > 6)
{
a = 8;
b = 10;
}
System.out.println("a = "+a+" , b = "+b);
if (i++ > 5 && j++ > 6)
{
i = 8;
j = 10;
}
System.out.println("i = "+i+" , j = "+j);
}
}
输出结果是:
---------- java ----------
a = 6 , b = 7
i = 6 , j = 6 |