Java Set aus String Array

Set<Integer> targetSet = new HashSet<Integer>(Arrays.asList(sourceArray));

// with google guava
Set<Integer> targetSet = Sets.newHashSet(sourceArray);
DevPedrada