Suppose an ArrayList list contains {"red", "red", "green"}. What is the list after the following code?

```
String element = "red";
for (int i = 0; i < list.size(); i++)
if (list.get(i).equals(element)) {
list.remove(element);
i--;
}
```
a. {"red", "red", "green"}
b. {"red", "green"}
c. {"green"}
d. {}

c

Computer Science & Information Technology

You might also like to view...

In Outlook Express, the ________ folder stores messages that you have deleted

A) Recycle Bin B) Outbox C) Deleted Items D) Empty

Computer Science & Information Technology

Many Web sites use a digital certificate to prove their identity to visitors. Why is the use of digital certificates considered a reliable form of authentication?

A. It complies with 802.1x. B. It is a form of trusted third-party authentication. C. It uses symmetric encryption keys. D. It is a web of trust.

Computer Science & Information Technology