Skip to content

Instantly share code, notes, and snippets.

@mevsungur
Last active August 6, 2020 16:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mevsungur/5ec45e58bd1ce516a225c196e5feffde to your computer and use it in GitHub Desktop.
Save mevsungur/5ec45e58bd1ce516a225c196e5feffde to your computer and use it in GitHub Desktop.
public static void main(String[] args) {
List<String> isimList = Arrays.asList("Sungur",null,"Mevlüt","Angular");
isimList = isimList.stream().filter(i -> i != null).sorted(String::compareTo)
.collect(Collectors.toList());
isimList.forEach(System.out::println);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment