qq_救赎_2
2016-06-19 18:03
ublic 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.plantln((a&&b)+"未通过")
System.out.plantln((a||d)+"通过")
System.out.plantln((!a)+"未通过")
System.out.plantln((c^d)+"通过")
}
}
//首先你的输出全部没有分号结束
//其次,你的输出语句有错误
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();
先指出错误,(1)public的p不见了(2)应该是System.out.println(),而不是plantln;(3)输出结尾没有分号;
然后罗列下改正后的:
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)+"通过");
}
怎么开头的第一行“public”少了个“p”,是少复制还是忘了?
Java入门第一季(IDEA工具)升级版
1167352 学习 · 18629 问题
相似问题
回答 4
回答 5
回答 5
回答 8
回答 1