摘要:
setScale(2, BigDecimal.ROUND_HALF_UP)改成setScale(2, RoundingMode.HALF_UP)就搞定了。对照表如下:java.math.BigDecimal.ROUND_CEILING Use RoundingMode.CEILING instead 阅读全文
摘要:
UPDATE I will get a similar warning with constructors for other primitive wrapper types; e.g. The constructor Boolean(boolean) is deprecated The const 阅读全文
摘要:
反射实例化对象clazz.getDeclaredConstructor().newInstance()跟class.newInstance() //使用 Object中的getClass() 方法获得 Class dateClass_1=date.getClass(); //使用 类名.class 阅读全文
摘要:
isAccessible is deprecated from JDK-9+ Oracle#doc#isAccessible Example if (forceAccess && !field.isAccessible()) { field.setAccessible(true); } , sugg 阅读全文
摘要:
@Test public void de() throws Exception { final Base64.Decoder decoder = Base64.getDecoder(); final Base64.Encoder encoder = Base64.getEncoder(); fina 阅读全文