-
What is the output of this program?
import java.util.*;
public class Bitset_Example
{
public static void main(String args[])
{
BitSet object = new BitSet(10);
for (int k = 0; k < 6; ++k)
object.set(k);
object.clear(2);
System.out.print(object);
}
}
-
- {0, 1, 3, 4, 5}
- {0, 1, 3, 4}
- {1, 3, 4, 5}
- {0, 1, 3, 4, 5, 6}
- None of these
Correct Option: A
{0, 1, 3, 4, 5}