O'Reilly logo

Just Java™ 2 by Peter van der Linden

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required