자바) Stream.of/ Arrays.stream/ Integer <-> int (23-05-18)
velog에서 이전한 글 입니다. Stream Stream.of/Arrays.stream int[] a = {1,2,3}; int[] b = {4,5}; String a = "hi my name is"; String[] b = a.split(" +"); Stream b1 = Stream.of(b); //참고 IntStream stream = Arrays.stream(a); Stream a1 = Stream.of(a); int[] c2 = Stream.of(a, b).flatMapToInt((v)->{ System.out.println(Arrays.toString(v)); return Arrays.stream(v); }).toArray(); System.out.println(Arrays.toString(c..
2023.07.13