摘要: Stream流之List、Integer[]、int[]相互转化 一、int[ ] 1.1、int[ ] 转 Integer[ ] public static void main(String[] args) { int[] arr = { 1, 2, 3, 4, 5 }; List<Integer 阅读全文
posted @ 2022-12-02 20:53 没有烦恼的猫猫 阅读(313) 评论(0) 推荐(0) 编辑
摘要: 你在写一个方法的时候, 例如传入 两个数组,而你要写的方法代码块又恰好有一种判断方式会导致你要写两个相同代码块, 你就可以自己调用自己,并把传参顺序 换一下 public int[] intersect(int[] nums1, int[] nums2) { if(nums1.length<nums 阅读全文
posted @ 2022-12-02 20:26 没有烦恼的猫猫 阅读(18) 评论(0) 推荐(0) 编辑