update lab5
This commit is contained in:
parent
879d207e0d
commit
531238a935
|
@ -30,9 +30,7 @@ public class Sentence {
|
||||||
HashSet<String> uniqueWords = new HashSet<>();
|
HashSet<String> uniqueWords = new HashSet<>();
|
||||||
|
|
||||||
for (String word : words) {
|
for (String word : words) {
|
||||||
if (!word.isEmpty()) {
|
uniqueWords.add(word.toLowerCase());
|
||||||
uniqueWords.add(word.toLowerCase());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
String[] uniqueSortedWords = uniqueWords.toArray(new String[0]);
|
String[] uniqueSortedWords = uniqueWords.toArray(new String[0]);
|
||||||
|
|
Loading…
Reference in New Issue