Java examples for java.util:BitSet
print BitSet
//package com.java2s; import java.util.BitSet; public class Main { public static void printBitSet(BitSet bits) { boolean bit; for (int i = 0; i < bits.length(); i++) { bit = bits.get(i);/* w w w. j a v a2s .c o m*/ if (bit) System.out.print(1); else System.out.print(0); } System.out.println(); } }