Überprüfen Sie, ob doppelte Element in Java
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
}
}