String[]转List<Integer>(数组里的元素为数字)

String[] idsArry =  enterprise.getProdSubTypeId().split(",");
List<Integer> ids =Arrays.stream(idsArry)
                         .map(s->Integer.parseInt(s.trim()))
                         .collect(Collectors.toList());

 

转载:https://blog.csdn.net/FU250/article/details/80004721