리스트의 리스트 선언하기
List<List<Integer>> ans = new ArrayList<List<Integer>>();
원시타입 배열을 리스트로 변환하는 법 (Java8 이상)
Arrays.stream(arr).boxed().collect(Collectors.toList());
'알고리즘 > Java 문법 암기' 카테고리의 다른 글
배열 같은 값으로 채우기 Arrays.fill() (0) | 2025.02.10 |
---|
리스트의 리스트 선언하기
List<List<Integer>> ans = new ArrayList<List<Integer>>();
원시타입 배열을 리스트로 변환하는 법 (Java8 이상)
Arrays.stream(arr).boxed().collect(Collectors.toList());
배열 같은 값으로 채우기 Arrays.fill() (0) | 2025.02.10 |
---|