string字符串转Int列表List

   characterIds = "1";
   String[] split = characterIds.split(",");
   int[] ints = Arrays.asList(split).stream().mapToInt(Integer::parseInt).toArray();
   List<Integer> collect = Arrays.stream(ints).boxed().collect(Collectors.toList());
posted @ 2021-06-23 14:35  MrFugui  阅读(143)  评论(0)    收藏  举报