生成随机数,时间格式转换,c语言生成1~100随机数
分享于 点击 49602 次 点评:261
生成随机数,时间格式转换,c语言生成1~100随机数
random r = new Random();
int a= r.nextint(100)
a代表0到99的随机整数
SimpleDateFormat format = new SimpleDateFormat("yyyy/mm/dd");
Date parse1 = format.parse("2016/1/1");
String format1 = DateFormat.getDateInstance().format(date3);
LocalDate date2 = LocalDate.of(2016, 11, 11);
java.time.LocalDate.plusDays(long daysToAdd)
方法返回此日期的副本,并添加了指定的天数。
daysToAdd
- 添加的日期,可能是负数。
date.plusdays(-10);
相关文章
- 暂无相关文章
用户点评