Java tutorial
//package com.java2s; import java.util.*; public class Main { public static void deleteDuplicate(List<Integer> list) { List<Integer> tempList = new ArrayList<Integer>(); Iterator<Integer> iter = list.iterator(); while (iter.hasNext()) { Integer current = iter.next(); if (tempList.contains(current)) { iter.remove(); } else { tempList.add(current); } } } }