[Solved] Why Bitset allows values distinct from 1 and 0?

BitSet logically represents a “vector of bits that grows as needed” (javadoc). When you create it via new BitSet(), you have all bits set to 0 (false). 0 5 10 | | | 000000000000… (virtually infinite sequence) Using set(x) you set to 1 (true) the bit at position x (where the first position is 0); … Read more