小编Har*_*ard的帖子

java条件运算符,为什么下面的代码输出为true?

class test {
    public static void main (String[] args) {
        boolean a = false;
        boolean b = true;

        if (a && a || b) {
            System.out.println(true);
        }
    }
} //--why it always true????o/p is true but why??
Run Code Online (Sandbox Code Playgroud)

java conditional-operator

4
推荐指数
1
解决办法
61
查看次数

标签 统计

conditional-operator ×1

java ×1