Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

remove duplicate string collection in java

String str2 = "ABABABCDEF";// ABCDEF
        String[] arr2 = str2.split("");
str2 = new LinkedHashSet<>(Arrays.asList(arr2)).toString().replace(", ", "");
        System.out.println(str2); // ABCDEF
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #remove #duplicate #string #collection #java
ADD COMMENT
Topic
Name
3+8 =