问答详情
源自: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.println((!a) +" 未通过");

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

    

    

    

    

}

}


提问者:慕丝1329035 2018-11-15 21:16

个回答

  • lynx
    2019-05-07 15:17:30

    因为最后一个分号是中文符号……需要时英文的;