问答详情
源自:4-3 Java条件语句之多重 if

Java入门第一卷中的

这是啥错误?不能用40<age<=60这种用法么? The operator <= is undefined for the argument type(s) boolean, int The operator <= is undefined for the argument type(s) boolean, int The operator <= is undefined for the argument type(s) boolean, int

提问者:孔雀东南飞1 2016-11-30 11:23

个回答

  • 孔雀东南飞1
    2016-11-30 19:50:23

    哦哦,谢啦

  • qq_勇敢的狩猎者_0
    2016-11-30 11:54:55

    因为java无法识别40<age<=60,必须用age>40&&age<=60代替