作业帮 > 综合 > 作业

The operator+is undefined for the argument type(s) java.math

来源:学生作业帮 编辑:百度作业网作业帮 分类:综合作业 时间:2024/07/16 05:05:12
The operator+is undefined for the argument type(s) java.math.BigDecimal,java.math.BigDecimal
The operator+is undefined for the argument type(s) java.math
a+b --> a.add(b);
再问: 我想知道这个错是为什么?你的方法我没有试!
再答: BigDecimal的加减乘除都被封装了方法 所以不能用基础类型的运算符直接运算