
JAVA学习笔记
Air0199
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
java创建静态map并设置初始值
1.使用匿名内部类public static HashMap<String, Integer> map = new HashMap<String,Integer>(){{put(“a”,1);put(“b”,2);put(“c”,3);put(“d”,4);}};即使加了final修饰符,用此方法创建的map也可以被修改2.使用静态代码块:public static Map<String, Integer> map;static {Map<原创 2021-09-03 11:52:57 · 3741 阅读 · 0 评论 -
Spring接口返回图片字节流
@RequestMapping("/queryPic")@ResponseBodypublic void queryPic(HttpServletResponse response) { File file = new File("D:\\test.png"); try { FileInputStream inputStream = new FileInputStream(file); byte[] data = new byte[(int) file.l原创 2021-09-03 11:16:17 · 568 阅读 · 0 评论 -
JAVA实现选择排序与冒泡排序
public class Demo_Sort { public static void main(String[] args) { //执行冒泡排序 bubbleSort(new int[]{123, 2, 1, 123, 132, 89, 380, 18, 2154, 42}); System.out.println(); //...原创 2019-08-12 21:29:09 · 136 阅读 · 0 评论