Periksa apakah elemen duplikat di 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
}
}