摘要:
### 创建 BigDecimal 建议使用 `public BigDecimal(String val)`,使用 number 参数可能会有精度问题 ### 设置精度 `setScale(3, BigDecimal.ROUND_HALF_UP)`,取三位小数,四舍五入 ### 比较大小 使用方法 阅读全文
摘要:
Date 方法 描述 解释 Date date1 = new Date() 当前时间 date1.getTime() 获取时间对应的毫秒数 返回 long setTime(milliseconds) 设置日期和时间 参数是一个毫秒数 date1.compareTo(date2) 比较先后 负数:da 阅读全文
摘要:
static 修饰成员变量,静态变量不属于对象,属于类变量,凡是这个类创建出来的对象,都可以共享这个变量 修饰方法,也是属于类的方法 final final 修饰的类不能被继承 final 修饰的对象,地址不能改变,对象属性值可以 final 修饰的方法不能被重写 final 修饰局部变量,不能二次 阅读全文
摘要:
# 截取 public String substring(int beginIndex, int endIndex),返回新的字符串,参数为 前闭后开 public String substring(int beginIndex),返回新的字符串,从参数位置开始截取到末尾 # 定位 public c 阅读全文
