I have a String field called userId that has comma separated values like String user = "123","456" I want to split it. I have written something like this
List<String> idList= employeeList.stream()
.map(UserDto::getUserId)
.filter(Objects::nonNull)
.map(String::toUpperCase)
.distinct()
.collect(Collectors.toList());
This UserDto::getUserId contains the comma separated values. Is it possible to split when streaming in the above logic.
Thanks