public static void main(String[] args) {
HashSet<Integer> hash = new HashSet<>();
hash.add(123);
hash.add(22);
hash.add(3);
hash.add(32);
hash.add(32);
hash.add(123);
hash.add(22);
hash.add(3);
hash.add(32);
hash.add(32);
for (int i : hash) {
if (i == 33) {
System.out.println("有:" + i);
}else{
System.out.println("没有有:" + 33);
}
}
System.out.println(hash);
}
System.out.println("有:" + i);
}else{
System.out.println("没有有:" + 33);
}
}
System.out.println(hash);
}