20250426

박흥수·2025년 4월 26일

코딩테스트

목록 보기
4/5
	// char to int
    char ch = '0';
    int chatToInt = Character.getNumericValue(ch);
    
    // ArrayList<Integer> to Integer[]
    List list = new ArrayList<Integer>();
    Integer[] arrInteger = list.toArray(Integer[]::new);
    
	// ArrayList<Integer> sort + ArrayList<Integer> to int[]
    int[] arrInt = list.stream().sorted().mapToInt(Integer::intValue).toArray();
profile
안녕하세요. 새로운 학습을 좋아하는 백앤드 개발자입니다.

0개의 댓글