public class First {
    public static void main(String[] args) {
        boolean a = false;
        boolean b = true;
        boolean c = false;
        if (a || b && c){
            System.out.println("ok");
        }
    }
}

上面什么也不输出,当把c改为true输出为ok 由此可见,是先运算 b&&c 再运算 a || 

相关文章:

  • 2021-10-08
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-10-27
  • 2021-11-23
  • 2021-09-25
  • 2022-12-23
  • 2022-12-23
  • 2021-08-07
相关资源
相似解决方案