I have an array, and am looking for duplicates.
duplicates = false; for(j = 0; j < zipcodeList.length; j++){ for(k = 0; k < zipcodeList.length; k++
How about using this method?
HashSet zipcodeSet = new HashSet(Arrays.asList(zipcodeList)); duplicates = zipcodeSet.size()!=zipcodeList.length;