update lab5

This commit is contained in:
BadOfficer 2023-05-31 11:13:34 +03:00
parent 879d207e0d
commit 531238a935
1 changed files with 1 additions and 3 deletions

View File

@ -30,10 +30,8 @@ public class Sentence {
HashSet<String> uniqueWords = new HashSet<>();
for (String word : words) {
if (!word.isEmpty()) {
uniqueWords.add(word.toLowerCase());
}
}
String[] uniqueSortedWords = uniqueWords.toArray(new String[0]);