摘要:
向上取整 System.out.println((int) Math.ceil(66.1)); 结果 67 向下取整 System.out.println((int) Math.floor(66.6)); 结果 66 四舍五入 System.out.println(Math.round(66.1)) 阅读全文
posted @ 2020-04-02 18:05
慕尘
阅读(1468)
评论(0)
推荐(0)
摘要:
对代码的执行耗时,可以使用 long start = System.currentTimeMillis(); ...... long end = System.currentTimeMillis(); System.out.println("任务耗时:" + (end - start)); org. 阅读全文
posted @ 2020-04-02 17:58
慕尘
阅读(778)
评论(0)
推荐(0)
摘要:
在springboot实现,即支持JSON数据返回格式,也能同时支持XML 在前端调用的时候添加 Accept:application/xml 或者Accept:application/json 返回对应的格式 添加依赖 <dependency> <groupId>com.alibaba</grou 阅读全文
posted @ 2020-04-02 15:04
慕尘
阅读(987)
评论(0)
推荐(0)
摘要:
(1)Arrays.asList 将数组转化为list Arrays.asList("a","ab","abc").stream() .filter(s->s.contains("ab")) .map(s->s.toUpperCase()) .forEach(System.out::println) 阅读全文
posted @ 2020-04-02 14:53
慕尘
阅读(17157)
评论(0)
推荐(1)

浙公网安备 33010602011771号