问答详情
源自:3-5 Java中的逻辑运算符

我这哪里错了啊老哥们

public class HelloWorld {

    public static void main(String[] args) {

boolean a = true; // a同意

boolean b = false; // b反对

boolean c = false; // c反对

boolean d = true; // d同意

   System.out.println((a && b) + "未通过");

        System.out.println((a || d) + "通过");

        System.out.prinrln((!a) + "未通过");    

        System.out.println((c ^ d) + "通过");

}

}


提问者:慕先生224317 2018-08-31 13:25

个回答

  • YCrazyc
    2018-09-09 15:56:43

    楼上不要乱说。兄弟,看第三行,println,不是prinrln

  • 慕慕5114087
    2018-08-31 13:52:48

    没错,但想通过就把System.out.println((a || d) + "通过");中的d改成b;