import java.util.*;
import java.util.stream.*;
public class MyClass {
public static void main(String args[]) {
Set<String> sets = new HashSet<>(Arrays.asList("1", "2", "3", "4", "5", "6"));
Set<Integer> seti = sets.stream().map(s -> Integer.parseInt(s))
.collect(Collectors.toSet());
System.out.println(seti);
}
}
/*
run:
[1, 2, 3, 4, 5, 6]
*/