Question
import java.util.*;
class Bitset {
public static void main(String args[]) {
BitSet obj = new BitSet(5);
for (int i = 0; i < 5; ++i)
obj.set(i);
System.out.print(obj.get(3));
}
}
What is the output of this program?
import java.util.*;
class Bitset {
public static void main(String args[]) {
BitSet obj = new BitSet(5);
for (int i = 0; i < 5; ++i)
obj.set(i);
System.out.print(obj.get(3));
}
}
Answer: Option A
Was this answer helpful ?
None.
Output:
$ javac Bitset.java
$ java Bitset
2
Was this answer helpful ?
More Questions on This Topic :
Question 10.
Which of these methods must be made static?
....
Submit Solution