Reputation: 9
I have BitSet1 - {2,4,6,8}
and another BitSet2 - {10,20}
. How to combine the two Bitsets and get the final BitSet as {2,4,6,8,10,20}
. Please help ?
Upvotes: 0
Views: 1387
Reputation: 10814
Use BitSet.or(BitSet)
to include all elements of the bit set passed as argument into the current bit set.
Upvotes: 6