Multiple choice technology programming languages

Which of the following most closely describes a bitset collection?

  1. A class that contains groups of unique sequences of bits

  2. A method for flipping individual bits in instance of a primitive type

  3. An array of boolean primitives that indicate zeros or ones

  4. A collection for storing bits as on-off information, like a vector of bits

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

A BitSet in Java is specifically designed to efficiently store and manipulate bits as on-off information, functioning like a vector of bits where each bit represents a boolean state (true/false or 1/0). It's not just a boolean array (option C), nor is it about flipping bits in primitives (B) or storing unique sequences (A).