Sprawdź, czy duplikat elementu w Javie
for (String name : names) {
if (set.add(name) == false) {
// your duplicate element
}
}
Eirik Hanssen
for (String name : names) {
if (set.add(name) == false) {
// your duplicate element
}
}