短路运算

public class Demo01 {
//短路运算
public static void main(String[] args) {
int a=5;
boolean b = (a<4)&&(a++<4);
System.out.println(b);
System.out.println(a);

}
}

false
5

posted @ 2022-03-13 20:40  HFUUwzy  阅读(46)  评论(0)    收藏  举报