- 博客(2)
- 收藏
- 关注
原创 Double随机 and 保留若干位小数
//这里直接使用Math.random(),y>x!//double随机数//[x,y)的double类型的随机数double d = x + Math.random() * (y - x);//(x, y]的double类型的随机数double d = y - Math.random() * (y - x);//[x, y]的double类型的随机数double d = x + Math.random() * y % (y - x + 1);//(x, y) 的double类型的.
2022-01-11 10:48:12
298
原创 Date格式化,两个Date之间的计算与比较
//格式化DateSimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");System.out.println(simpleDateFormat.format(new java.util.Date()));//Date转换成long去比较,换算System.out.println(date1.getTime() > date2.getTime());System.out.prin.
2022-01-11 10:32:28
269
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人
RSS订阅