java
fengdong1996
这个作者很懒,什么都没留下…
展开
-
BigDecimal常用方法
1、double和float问题double和float在平时使用中常常会出现一些意想不到的结果,当我们想进行精确计算时他们显然不是一个好选择,如果想保留小数点后几位显然更难操作。因此在涉及到金钱计算或想指定小数位数时用BigDecimal是最好的选择。double和float出现的问题public static void main(String[] args) { ...原创 2019-03-27 17:05:40 · 1000 阅读 · 0 评论 -
java md5加密
1、commons-codec包下需要依赖:<dependency> <groupId>commons-codec</groupId> <artifactId>commons-codec</artifactId></dependency>所在包:import org.apache.commons.codec.d...原创 2019-08-01 12:43:47 · 169 阅读 · 0 评论 -
java封装常用方法
1、将单位为秒的时间转换为"00:00:00"格式字符串/** * 将秒转换为 00:00:00格式 * * @param seconds * @return * @Description */public String showTime(Integer seconds) { if (seconds != null) { int temp = 0; StringBuff...原创 2019-07-27 23:55:22 · 745 阅读 · 0 评论