Question: java please 1.wordSet is type Multiset . What is true about the code below? wordSet.add(bird); wordSet.add(tree); wordSet.add(bird); while(wordSet.contains(bird)) { wordSet.remove(bird); } Group of answer choices

java please

1.wordSet is type Multiset.

What is true about the code below?

wordSet.add("bird"); wordSet.add("tree"); wordSet.add("bird"); while(wordSet.contains("bird")) { wordSet.remove("bird"); } 

Group of answer choices

there is a compiler error

there will be a runtime error (an exception thrown)

there will be an infinite loop

none of these is correct

2. wordSetis type Multiset.

What is true about the code below?

wordSet.add("bird"); wordSet.add("tree"); wordSet.add("dog"); while(!wordSet.isEmpty()) { wordSet.remove("cat"); } 

Group of answer choices

none of these is correct

there is a compiler error

there will be a runtime error (an exception thrown)

there will be an infinite loop

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock 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 Databases Questions!