自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(10)
  • 收藏
  • 关注

原创 spring项目中用到的注解

@SuppressWarnings 作用:用于抑制编译器产生警告信息。其注解目标为类、字段、函数、函数入参、构造函数和函数的局部变量。而家建议注解应声明在最接近警告发生的位置。四、抑制警告的关键字                                关键字 用途 all to suppress all warnings boxing to suppress warnings relative to boxing/unboxing operatio...

2021-07-22 10:22:41 75

原创 项目中常见的代码缺陷

1.Minor行尾注释2.Critical圈复杂度过高,if else 嵌套过深。

2021-07-22 09:25:58 504

原创 怎么遍历Map?

class Solution { public int firstUniqChar(String s) { Map<Character,Integer> map = new HashMap<>();//字母,索引 for(int i=0;i<s.length();i++){ if(!map.containsKey(s.charAt(i))){ map.put(s.charAt(i).

2021-07-11 18:36:24 113

原创 leetcode中的位运算小技巧

2021-07-10 20:43:46 73

原创 LinkedList的哪些我不太记得的函数总结

java.util.LinkedList<E> public boolean offerLast(E e)Inserts the specified element at the end of this list.在此列表末尾插入指定的元素。LinkedList<Integer> list = new LinkedList<>(); list.offerLast(19);

2021-07-10 15:22:52 51

原创 try-catch-finally 中有return,finally中的代码是否还会执行呢?答案是——会的!

private static int test(int i){ try { i++; return 9; // throw new Exception(); } catch (Exception e) { System.out.println(i); return i; } finally { ...

2021-07-09 16:49:31 133

原创 数组处理合集

数组处理合集1.Arrays.sort函数使用lambda表达式实现二维数组排序int[][] pair = new int[][]{{13,4},{2,3},{5,9}}; Arrays.sort(pair, (w, q) -> (q[1] - w[1])); System.out.println(JSONObject.toJSONString(pair));运行结果如下:2.很奇怪,为什么一维数组这么写就会报错呢?3.list转换成数组class

2021-06-29 22:00:45 57

原创 学习使用SpringBoot框架搭建项目完成一个推送消息的定时任务

学习使用SpringBoot框架搭建项目完成一个推送消息的定时任务SpringBoot框架的搭建(工具idea)SpringBoot框架的搭建(工具idea)

2021-06-19 22:43:02 228

原创 java.lang.String 中的indexOf函数

java.lang.String 中的indexOf函数Returns the index within this string of the first occurrence of the specified substring.The returned index is the smallest value k for which:System.out.println("insdfInfinity".indexOf("Infinity"));输出:5s1.indexOf(s2);返回字符串

2021-06-15 16:47:18 1422

原创 列表转数组那些事儿——java.util.List中的toArray函数

java.util.List中的toArray函数java.util.List<E> @NotNull public abstract <T> T[] toArray(@NotNull T[] a)Returns an array containing all of the elements in this list in proper sequence (from first to last element); the runtime type of the returned

2021-06-15 16:20:59 548 1

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除