I need to convert comma separated string to list of integers. For example if I have following string
String numbersArray = \"1, 2, 3, 5, 7, 9,\";
Using java 8 Streams:
List longIds = Stream.of(commaSeperatedString.split(",")) .map(Integer::parseInt) .collect(Collectors.toList());