📜  从 android 中的 arraylist 中删除重复项 - Java 代码示例

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

代码示例1
ArrayList withDuplicateValues;
 HashSet withUniqueValue = new HashSet<>(withDuplicateValues);
 
 withDuplicateValues.clear();
 withDuplicateValues.addAll(withUniqueValue);