String l = "63, 47, 51, 35, 36, 52, 37, 53, 38, 54, 39, 55, 40, 56, 41, 57, 42";List<Integer> list = Arrays.asList(l.split(", ")).stream() .map(s -> Integer.parseInt(s)) //.map(Integer::valueOf) .collect(Collectors.toList());