devxlogo

April 13, 2004

Check for Duplicates in an ArrayList

This is a simple method to check for duplicates in an ArrayList: checkDuplicate : Methodpublic static boolean checkDuplicate(ArrayList list) { HashSet set = new HashSet(); for (int i = 0;