update lab5
This commit is contained in:
parent
879d207e0d
commit
531238a935
|
@ -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]);
|
||||
|
||||
|
|
Loading…
Reference in New Issue