List<String> filtered=list.stream().filter(string -> !string.isEmpty()).collect(Collectors.toList());string