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"));
hash.clear();
System.out.println(hash);
System.out.println(hash.isEmpty());
}
}
/*
run:
[]
true
*/