Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/381.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 表达式if语句的开头非法_Java_Jcreator - Fatal编程技术网

Java 表达式if语句的开头非法

Java 表达式if语句的开头非法,java,jcreator,Java,Jcreator,我不确定if语句中的错误在哪里,非常感谢您的帮助 导入java.util.Scanner; 公共课练习4p94{ public static void main(String[] args) { Scanner input = new Scanner(System.in); int carNum; boolean chck; do { chck = true; System.out.println("Enter the Car Mo

我不确定if语句中的错误在哪里,非常感谢您的帮助

导入java.util.Scanner; 公共课练习4p94{

public static void main(String[] args) {
    Scanner input = new Scanner(System.in);
    int carNum;
    boolean chck;
    do {
        chck = true;
        System.out.println("Enter the Car Model Number: ");
        carNum = input.nextInt();

        if (carNum == 119 || carNum == 179 || carNum >== 189 && carNum <== 195 || carNum == 221 || carNum == 780){
            System.out.println("Your car is defective and must be repaired");
        } else if (!(carNum == 119 || carNum == 179 || carNum >= 189 && carNum <= 195 || carNum == 221 || carNum == 780)){
            System.out.println("Your car is not defective");
        } else {
            System.out.println("Please enter a valid car model number");
            chck = false;
        }
    } while (chck);
}
publicstaticvoidmain(字符串[]args){
扫描仪输入=新扫描仪(System.in);
内卡努姆;
布尔chck;
做{
chck=真;
System.out.println(“输入车型号:”);
carNum=input.nextInt();

如果(carNum==119 | | carNum==179 | | carNum>==189&&carNum=189&&carNum则在大于/小于号之后不需要两个等号

 carNum >= 189 && carNum <= 195

carNum>=189&&carNum
=
=
看看
carNum>==189&&carNum该死。当你自己阅读时很难看到。谢谢你。这就是为什么你应该使用一个IDE来为你突出这些问题。你推荐哪一个呢?我查看了Eclipse,JCreator只是为了上学。@EpicNicks Eclipse很好,也可以查看IntelliJ(不是免费的)