📜  java 删除重复项 - Java 代码示例

📅  最后修改于: 2022-03-11 14:52:22.903000             🧑  作者: Mango

代码示例6
String str2 = "ABABABCDEF";// ABCDEF
        String[] arr2 = str2.split("");
str2 = new LinkedHashSet<>(Arrays.asList(arr2)).toString().replace(", ", "");
        System.out.println(str2); // ABCDEF