logo CodeStepByStep logo

removeAll

Language/Type: Java ArrayList collections
Related Links:

Write a method named removeAll that accepts as a parameter an ArrayList of strings along with an element value string, and modifies the list to remove all occurrences of that string. For example, if the list v contains {"a", "b", "c", "b", "b", "a", "b"}, the call of removeAll(v, "b"); should modify it to store {"a", "c", "a"}.

Method: Write a Java method as described, not a complete program or class.

You must log in before you can solve this problem.

Log In

Need help?

Stuck on an exercise? Contact your TA or instructor.

If something seems wrong with our site, please

Is there a problem? Contact us.