convert list of items to hashset code example Example: convert array list to Hashset Set<Integer> set = new HashSet<Integer>(arrayList);