Answers for "how to print the repeated elemnets in an array in java"

-1

find repeated elements in array java

for (String name : names) {
     if (set.add(name) == false) {
        // your duplicate element
     }
}
Posted by: Guest on February-26-2021
-1

find repeated elements in array java

for (String name : names) {
     if (set.add(name) == false) {
        // your duplicate element
     }
}
Posted by: Guest on February-26-2021

Code answers related to "how to print the repeated elemnets in an array in java"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language