A A
7. JAVA 타입 형변환 정리
728x90
반응형

1. chat -> int

sum += Character.getNumericValue(a);

 

 

 

2. Array -> List

/* Array to List */
List<Integer> intList = Arrays.stream(scoville).boxed().collect(Collectors.toList());

 

 

반응형
Copyright 2024. GRAVITY all rights reserved