这样写程序为什么会错呢,应该怎么修改呢?
关注
码龄 粉丝数 原力等级 --
- 被采纳
- 被点赞
- 采纳率

首页/
已采纳
The operator || is undefined
收起
- 写回答
- 好问题 0 提建议
- 关注问题
微信扫一扫
点击复制链接分享
- 邀请回答
- 编辑 收藏 删除 结题
- 收藏 举报
3条回答 默认 最新
- 关注
码龄 粉丝数 原力等级 --
- 被采纳
- 被点赞
- 采纳率
miaoch 2017-12-19 23:39关注...这个逻辑都能写出来啊?
你用||连接起来的就算不报错 也是一个boolean类型呀,,,
得改成 "100006x".equals(xxx) || "100007x".equals(xxx) || "100008x".equals(xxx)
建议先 String com = contract.get.......
写起来方便一点本回答被题主选为最佳回答 , 对您是否有帮助呢? 本回答被专家选为最佳回答 , 对您是否有帮助呢? 本回答被题主和专家选为最佳回答 , 对您是否有帮助呢?解决 无用评论 打赏举报微信扫一扫
点击复制链接分享
编辑预览轻敲空格完成输入- 显示为
- 卡片
- 标题
- 链接
评论按下Enter换行,Ctrl+Enter发表内容
编辑
预览

轻敲空格完成输入
- 显示为
- 卡片
- 标题
- 链接
报告相同问题?
提交
- 2017-03-20 15:40在风中的意志的博客 if( (sizeA ) || (sizeB ) || (sizeC ) ){}这样,会报如上异常The operator || is undefined for the argument type(s) int, int。Answer因为,在Java内部,只能出线boolean类型的运算使用 运算符||。当Integer之间...
- 2025-03-02 02:21学Java的小半的博客 到底应该怎么写,“The operator <= is undefined for the argument type(s) boolean, int”的报错到底是怎么回事?下面,为大家一一解答如上,要判断变量month,是否在4,10之间,我们很可能写成 if (4 )但这时...
- 煮一壶生死悲欢祭少年郎的博客 然后就报的The operator - is undefined for the argument type(s) String, int 错 这是证明有未定义的整形或者字符型变量,如果一个表达式不是已定义的变量,要用()引起来 应该改成 System.out.println("您还有"+...
- 转让半包_辣条的博客 BigDecimal a=new BigDecimal(1234); BigDecimal b=new BigDecimal(3456); a.add(b)加 a.subtract(b)减 BigDecimal 大额金钱交易定义类型
- 2023-11-05 10:20王一羊.中国的博客 我就很不明白,跟着老师敲得,怎么会出错,然后我发现在user中定义的返回类型是int,原因就是这个,至于为啥,我也不知道,有知道的大佬可以指点一下,把int 改成integer就行了。一个新手小白可能会遇到的问题。
- 2021-02-13 12:08洛阳八中我最棒的博客 the operator “undefined” is not permitted 正确写法: const updatetUser = (data)=>{ const {birth,city,country,create_time,district,gender,id,job,nick_name,phone_number,portrait,province,register...
- 2021-05-15 09:09一片绿的发慌的树叶的博客 我写的代码: System.out.println("a&b" + a&b); 错误: The operator & is undefined for the argument type(s) String, int 改下代码: System.out.println("a&b" + (a&b));
- 好好学习哦耶的博客 写的这样,报题目中的错误。...The operator - is undefined for the argument type(s) String, int 这说明有未定义的整形或者字符型变量,如果一个表达式不是已定义的变量,要用()引起来 改为:
- 2025-01-12 13:36Yongqiang Cheng的博客 C++ macro: The # operator
- 2015-03-15 07:46shijiebei2009的博客 package ... public class TestInteger ... * 非常奇怪的问题,问题来源是在Struts2...// 编译错误: The operator == is undefined for the argument type(s) int, null System.out.println( 0 == null ); } }
- 追随者永远是胜利者的博客 the operator(什么什么)is undefinded for the argument byte[s]:这句话的意思是:出现这个异常所对应的代码语句,在进行赋值或者判断,运算符的左边不存在运算符右边的类型。也就是把基本类型赋值给引用类型了。 ...
- 2025-01-17 13:39Yongqiang Cheng的博客 C++macro:The##operator
- 2020-10-08 09:02异世界指挥官的博客 我自定义了一个LinkedList< T >类, 但是没法比较T泛型的两个对象的大小。 改为LinkdedList< T extends Comparable< T > >即可。...这样就代表泛型实现了Comparable接口了,自然可以用其重写的...
- 2023-08-02 04:02spencer_tseng的博客 The method withSorts(FieldSortBuilder) is undefined for the type NativeSearchQueryBuilder org.springframework.data.elasticsearch.core.query.NativeSearchQueryBuilder
- weixin_34244102的博客 今天在做一个用三元运算符判断奇偶的小练习时遇到“the operation % is undefined for the argument type string,int”错误的小插曲 开始的程序是这样写的 1 2 3 4 5 6 7 8 9 10 11 packagecom.lixiyu; ...
- 2011-09-01 10:44xinnian25的博客 内容 if (this.count[0] += ...The operator += is undefined for the argument type(s) long, boolean 解决 Boolean.valueOf("this.count[0] += (paramInt ) ).booleanValue() 参考文章 http://www.im47.cn/?p=891
- 2011-01-02 10:34iteye_20054的博客 此处报错 if (users.getUsersid() !...= is undefined for the argument type(s) long, null 通过Ctrl+左键找到错误源 private long usersid; public long getUsersid() { return this.usersid;...
- 没有解决我的问题, 去提问