随笔分类 -  java

摘要:String code = String.valueOf((int)((Math.random() * 9 + 1) * Math.pow(10,5))); Math.random()表示的范围是 [0,1)的前闭后开区间,0~0.1,0.1~0.2的每个区间都是等概率的 Math.random() 阅读全文
posted @ 2021-10-25 09:30 龙宇在天 阅读(884) 评论(0) 推荐(0)
摘要:删除某个文件夹及下面所有文件 public static void main(String[] args) { File file = new File("F:/test/2020"); delDir(file); } public static void delDir(File file) { i 阅读全文
posted @ 2020-11-19 16:48 龙宇在天 阅读(232) 评论(0) 推荐(0)
摘要:/* * ArrayList:随机遍历比顺序遍历的效率高,因为它实现了RandomAccess接口 * LinkedList:顺序遍历比随机遍历的效率高,因为它没有实现RandomAccess接口 */ java.util.List<String> list = new ArrayList<>(); 阅读全文
posted @ 2020-08-31 14:22 龙宇在天 阅读(177) 评论(0) 推荐(0)
摘要:参考文章: 1.接口的幂等性 2.分布式系统中接口的幂等性 阅读全文
posted @ 2020-06-15 15:11 龙宇在天 阅读(177) 评论(0) 推荐(0)
摘要:package com.charm.busi.util; import java.io.ByteArrayOutputStream; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java. 阅读全文
posted @ 2020-03-30 16:12 龙宇在天 阅读(1169) 评论(0) 推荐(0)
摘要:String json =new Gson().toJson(map); JsonObject jsonObject =new JsonParser().parse(json).getAsJsonObject(); 阅读全文
posted @ 2020-03-12 10:42 龙宇在天 阅读(902) 评论(0) 推荐(0)
摘要:String[] ids = {"a","b","c"}; List<String> list = new ArrayList<String>(); Collections.addAll(list, ids); 阅读全文
posted @ 2020-03-12 09:00 龙宇在天 阅读(4552) 评论(0) 推荐(0)
摘要:代码: package com.demo; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import o 阅读全文
posted @ 2020-01-15 08:25 龙宇在天 阅读(1297) 评论(0) 推荐(0)
摘要:Eclipse创建Maven项目 阅读全文
posted @ 2019-01-25 18:26 龙宇在天 阅读(99) 评论(0) 推荐(0)
摘要:还未验证过。。。。。。 摘自:http://www.cnblogs.com/axing/archive/2012/05/25/Excel-65535.html http://www.cnblogs.com/steven158/p/7582592.html 阅读全文
posted @ 2017-09-02 15:56 龙宇在天 阅读(136) 评论(0) 推荐(0)

//右侧添加目录 //增加页面点击显示24字社会主义核心价值观