package javaapplication1;
import java.util.HashSet;
public class JavaApplication1 {
public static void main(String[] args) {
HashSet hash = new HashSet();
hash.add(new Integer("1"));
hash.add(new Integer("2"));
hash.add(new Integer("3"));
hash.add(new Integer("4"));
hash.add(new Integer("5"));
hash.add(new Integer("6"));
hash.add(new Integer("7"));
boolean b = hash.remove(new Integer("4"));
System.out.println(b);
System.out.println(hash);
}
}
/*
run:
true
[1, 2, 3, 5, 6, 7]
*/