Question: What is the output of this program? (a) {0, 1, 3, 4} (b) {0, 1, 2, 4} (c) {0, 1, 2, 3, 4} (d) {0,

What is the output of this program?import java.util. *; class Bitset { public static void main(String args[]) { BitSet obj = new BitSet (5); for

(a) {0, 1, 3, 4}

(b) {0, 1, 2, 4}

(c) {0, 1, 2, 3, 4}

(d) {0, 0, 0, 3, 4}

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); obj.clear (2); System.out.print (obj); }

Step by Step Solution

3.53 Rating (170 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

a... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Advanced Java Programming Questions!