BigDecimal amount = new BigDecimal(0); amount.add( new BigDecimal(6) ); //这样写amount的值不会发生变化 amount = amount.add( new BigDecimal(6) ); //这才能正确赋值
Integer num = 7; return num.equals(7); // boolean
StringUtils.isNotEmpty(null) = false StringUtils.isNotEmpty("") = false StringUtils.isNotEmpty(" ") = true StringUtils.isNotEmpty(" ") = true StringUtils.isNotEmpty("bob") = true StringUtils.isNotEmpty(" bob ") = true
还有 isNotBlank 等用法 参考html
List<Person> destList=new ArrayList<Person>(); destList.addAll(srcList);
其余方法 参考前端