String a="1,2";List<Integer> strings = Stream.of(a.split(",")).map(Integer::parseInt).collect(Collectors.toList());