Other Utility Classes

BitSet

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.

Stack

The Stack class maintains a Last-In-First-Out stack of Objects. You can push (store) objects to arbitrary ...

Get Just Java™ 2 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.