我必须在项目中多次声明和初始化BigDecimal包装器对象.然后哪个更好的方法由Java代码:
BigDecimal num=new BigDecimal("123");
Run Code Online (Sandbox Code Playgroud)
或者在NumberUtils课堂上已经有一个静态方法可用
public static BigInteger createBigInteger(String str) {
if (str == null) {
return null;
}
return new BigInteger(str);
}
BigDecimal num=NumberUtils.createBigInteger("123");
Run Code Online (Sandbox Code Playgroud)
请告诉我,这是更好的方法,因为我们比较了性能(内存和速度).
我在my.conf文件中使用default_time_zone ='+ 00:00'并重启mysql服务器.但是再次默认时区显示SYSTEM.