String array change to IntegerList
String[] arr = {'1', '2', '3'} List<Integer> numList = Arrays.stream(arr ) .map(Integer::parseInt) .collect(Collectors.toList());
文章標籤
全站熱搜
String array change to IntegerList
String[] arr = {'1', '2', '3'} List<Integer> numList = Arrays.stream(arr ) .map(Integer::parseInt) .collect(Collectors.toList());