Удаление скомпилированных файлов

Set не позволяет дублировать, где List позволяет дублировать.

String[] words;
Set<String> uniqueWords = new HashSet<String>();
words = str1.split("[!-~]* ");
for (int i = 0; i < words.length; i++)
    uniqueWords.add(words[i]); //Here you need not to check with set because it wont allow duplicates
-2
задан Vlad Skoriy 13 July 2018 в 11:20
поделиться