diff --git a/src/main/java/core/basesyntax/FileWork.java b/src/main/java/core/basesyntax/FileWork.java index a4fea2ca..6934a6d0 100644 --- a/src/main/java/core/basesyntax/FileWork.java +++ b/src/main/java/core/basesyntax/FileWork.java @@ -14,7 +14,7 @@ public String[] readFromFile(String fileName) { StringBuilder content = new StringBuilder(); String line; - while ((line = reader.readLine()) != null){ + while ((line = reader.readLine()) != null) { content.append(line).append(" "); } reader.close(); @@ -25,7 +25,7 @@ public String[] readFromFile(String fileName) { Matcher matcher = pattern.matcher(text); HashSet filteredWords = new HashSet<>(); - while(matcher.find()) { + while (matcher.find()) { String word = matcher.group(); if (word.startsWith("w")) { filteredWords.add(word);