import java.util.HashSet;
public class MyClass {
public static void main(String args[]) {
int array[] = {2, 3, 6, 5, 30, 0};
HashSet<Integer> hset = new HashSet<>();
for (int element : array) {
hset.add(element);
}
System.out.println(hset);
}
}
/*
run:
[0, 2, 3, 5, 6, 30]
*/