package tree2;
import java.util.BitSet;
public class BitSetDemo {
public static void main(String[] args) {
int count = 10000;
BitSet bit = new BitSet(count);
int i = 1000;
while(i > 0) {
bit.set((int)(Math.random()*count));
i--;
}
for(int index=0; index<count; index++) {
if(bit.get(index)) {
System.out.print(index+",");
}
}
System.out.println("end");
}
}