Removing Duplicate Values from ArrayList

后端 未结 18 1296
无人及你
无人及你 2020-11-30 03:24

I have one Arraylist of String and I have added Some Duplicate Value in that. and i just wanna remove that Duplicate value So how to remove it.

Here Example I got o

18条回答
  •  一向
    一向 (楼主)
    2020-11-30 04:10

    private static void removeDuplicates(List list)
    {
        Collections.sort(list);
        int count = list.size();
        for (int i = 0; i < count; i++) 
        {
            if(i+1

提交回复
热议问题