摘要:
BigDecimal decimal = new BigDecimal("3.116"); //四舍五入(>=5进位) BigDecimal decimal1 = decimal.setScale(2, BigDecimal.ROUND_HALF_UP); //四舍五入(>5进位) BigDecim 阅读全文
posted @ 2024-06-28 17:47
一隅桥畔
阅读(286)
评论(0)
推荐(0)
摘要:
List<Integer> list = new ArrayList<>(); list.add(1); list.add(2); list.add(3); //是否至少一个元素满足 boolean match = list.stream().anyMatch(i -> i > 2 && i < 6 阅读全文
posted @ 2024-06-28 16:41
一隅桥畔
阅读(146)
评论(0)
推荐(0)
摘要:
List<String> list = new ArrayList<>(); List<BigDecimal> newList = list.stream().map(BigDecimal::new).collect(Collectors.toList()); 阅读全文
posted @ 2024-06-28 16:12
一隅桥畔
阅读(49)
评论(0)
推荐(0)

浙公网安备 33010602011771号