mirror of
https://github.com/ASDjonok/OOP_IO-2x_2023.git
synced 2025-06-07 22:49:24 +03:00
update lab5
This commit is contained in:
parent
879d207e0d
commit
531238a935
@ -30,9 +30,7 @@ public class Sentence {
|
||||
HashSet<String> uniqueWords = new HashSet<>();
|
||||
|
||||
for (String word : words) {
|
||||
if (!word.isEmpty()) {
|
||||
uniqueWords.add(word.toLowerCase());
|
||||
}
|
||||
uniqueWords.add(word.toLowerCase());
|
||||
}
|
||||
|
||||
String[] uniqueSortedWords = uniqueWords.toArray(new String[0]);
|
||||
|
Loading…
x
Reference in New Issue
Block a user