void (String[] args) { Set<String> set = Arrays.stream(args).co<caret>llect(Collectors.toSet()); List<String> list = new ArrayList<>(set); // foo list.sort(null); // bar System.out.println(list.toArray(/*baz*/)); }