Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
private void exercise7() throws IOException {
try (BufferedReader reader = Files.newBufferedReader(
Paths.get("SonnetI.txt"), StandardCharsets.UTF_8)) {
List<String> newWords =
.flatMap(line -> Stream.of(line.split(WORD_REGEXP)))
.sorted((aString, anotherString) -> aString.length() - anotherString.length())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.