class Demo
{
public static void main(String[] args)
{
int x = 0,y = 1;
/*
if (++x == y-- & x++ ==1 || --y == 0)
{
System.out.println("x="+x+",y="+y); //x = 2,y = 0;
}
else
{
System.out.println("y="+y+",x="+x);
}
*/
if(++x == y--)
System.out.println("y="+y+",x="+x); //成立!
else
System.out.println("x="+x+",y="+y);
}
}
//
原文地址:https://www.cnblogs.com/wu1611312486/p/10513609.html
时间: 2024-11-01 10:52:43