BigDecimal bigDecimal=new BigDecimal("0.0");
BigDecimal bigDecimal1=new BigDecimal(0);
//一定要用compareTo去比较被除数是否为0,不能用equals
if (BigDecimal.ZERO.compareTo(bigDecimal)==0 || bigDecimal == null) { System.out.println("true1111"); }
标签:lang,java,BigDecimal,ArithmeticException,zero,new,bigDecimal From: https://www.cnblogs.com/tiancai/p/17805634.html