List to Array

youngkyu MIn·2023년 9월 5일

		List<Integer> IntegerList = new ArrayList<>();

      	int[] intArr = IntegerList.stream().mapToInt(Integer::intValue).toArray();


        List<String> StringList = new ArrayList<>();

        String[] strArr = StringList.stream().toArray(String[]::new);


Stream!!

profile
한 줄 소개

0개의 댓글