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) + " 通过");
}
}
System.out.println((a||b)+"通过");符号 或 怎么敲进去的哦,我是直接复制粘贴的
System.out.println((a&&b) + " 未通过");
System.out.println((a||d) + " 通过");
System.out.println((!a) + " 未通过");
System.out.println((c ^ d) + " 通过");
这几句话 在通过/未通过 后面的括号为中文形式,所以编译未通过。
你每一句的最后边的括号要用英语输入法输入 你用的是中文输入