Suppose an ArrayList list contains {"red", "red", "green"}. What is the list after the following code?
```
String element = "red";
for (int i = list.size() - 1; i >= 0; i--)
if (list.get(i).equals(element))
list.remove(element);
```
a. {"red", "red", "green"}
b. {"red", "green"}
c. {"green"}
d. {}
c. {"green"}
You might also like to view...
Which of the following statements is false?
a. A class can directly inherit from class Object. b. It's often much more efficient to create a class by inheriting from a similar class than to create the class by writing every line of code the new class requires. c. If the class you're inheriting from declares instance variables as private, the inherited class can access those instance variables directly. d. A class's instance variables are normally declared private to enforce good software engineering.
Answer the following questions true (T) or false (F)
1. A Java collection is any class that implements the Collection interface.
2.