SyntaxFix
Write A Post
Hire A Developer
Questions
You can use something like this:
List<Integer> newList = new ArrayList<Integer>(); for(int i : yourOldList) { yourOldList.remove(i); if(yourOldList.contains(i) && !newList.contains(i)) newList.add(i); }