mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-04-19 03:01:48 +08:00
除数和被除数任意一个为0 会抛出Exception in thread "main" java.lang.ArithmeticException: / by zero 异常
This commit is contained in:
parent
055e429229
commit
e6d85ccd75
@ -756,10 +756,6 @@ public class NumberUtil {
|
|||||||
return v1.divide(v2, scale, roundingMode);
|
return v1.divide(v2, scale, roundingMode);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void main(String[] args) {
|
|
||||||
System.out.println(div(BigDecimal.ZERO,BigDecimal.ZERO));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 补充Math.ceilDiv() JDK8中添加了和Math.floorDiv()但却没有ceilDiv()
|
* 补充Math.ceilDiv() JDK8中添加了和Math.floorDiv()但却没有ceilDiv()
|
||||||
*
|
*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user