Skip to content

Instantly share code, notes, and snippets.

@deepakmehra10
Created March 10, 2020 17:30
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 deepakmehra10/9931071869f48f30e0239e1ee3af61cf to your computer and use it in GitHub Desktop.
Save deepakmehra10/9931071869f48f30e0239e1ee3af61cf to your computer and use it in GitHub Desktop.
String name = "Deepak\nKanika";
List<String> names = names.lines().collect(Collectors.toList());
System.out.println(names); // [Deepak, Kanika]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment