
Java
大宝vs
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
jdk1.8将list根据指定的值去分组的方法
Map<String, List<CommentQuery>> commentList = list.stream().collect(Collectors.groupingBy(CommentQuery::getNewsId)); for (Map.Entry<String, List<CommentQuery>> ent...原创 2018-08-10 09:56:16 · 4472 阅读 · 0 评论 -
java 宝箱概率问题
long count; //概率获取宝箱金币数量 Random r = new Random(); int n6 = r.nextInt(20); int num; /* * 宝箱规则:金币获得概率为:1到40 为35%,41到80为50%,81到120为10%,121到200为5% ...原创 2018-08-10 10:36:56 · 1110 阅读 · 0 评论 -
根据时间获取当前周的任意的日期
// 获得当前周- 周日 的日期 public String getPreviousSunday(String date) throws ParseException { SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");//设置日期格式 Calendar cal = C...原创 2018-08-10 10:38:43 · 618 阅读 · 0 评论 -
获得当前月--结束日期
// 获得当前月--结束日期 public String getMaxMonthDate(String date) { SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");//设置日期格式 Calendar calendar = Calendar.getInstance();...原创 2018-08-10 10:39:38 · 155 阅读 · 0 评论