List of utility methods to do Array Unique
final Set<Integer> set = new HashSet<Integer>(); for (int i = 0; i < ints.length; i++) { set.add(ints[i]); return set.size();