Programming Tutorials

Comment on Tutorial - BitSet example in Java By Lakshmi



Comment Added by : Stolen Leaves

Comment Added at : 2014-08-20 15:37:17

Comment on Tutorial : BitSet example in Java By Lakshmi
Hi,

What is done here is, bitset.get(0, 15) returns a sub-bitset from the original one. So, bitset1 stores values same as bitset between positions 0 and 15 for the first statement. So, you have 2 bitsets, say 001100101010 and 101000100011. the xor simply does and xor, and produces the following as the new bitset

001100101010
101000100011
-----------------
011011110110

this continues on...


View Tutorial