java???list?????????????
???????????? ???????[ 2014/4/2 9:44:49 ] ????????java ?????
package com.zhangle.arithmetic;
import java.util.ArrayList;
import java.util.List;
public class ClearRepeat {
/**
* @param args
*/
public static void main(String[] args) {
List<String> list=new ArrayList<String>();
list.add("abc");
list.add("efg");
list.add("ghi");
list.add("ghi");
list.add("ghi");
list.add("efg");
for (int i = 0; i < list.size();i++) {
int j=list.lastIndexOf(list.get(i));
if (i!=j) {
list.remove(j);
i--;//????????????i??????λ???i==j?????????????
}
}
System.out.println(list);
}
}
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11