June 2004
Intermediate to advanced
848 pages
21h 28m
English
This class maintains a set of bits that are identified by the value of an integer, like an array index. You can have over two billion individual bits in a set (if you have enough virtual memory), each of which can be queried, set, cleared, and so on. The bit set will increase dynamically as needed to accommodate extra bits you add.
public BitSet(); // constructorpublic BitSet(int N); // constructor for set of size N bitspublic void or (BitSet s); // OR's one bit set against another.public void set (int i); // sets bit number i.public int size(); // returns the number of bits in the set.
The Stack class maintains a Last-In-First-Out stack of Objects. You can push (store) objects to arbitrary ...
Read now
Unlock full access