Question: I need help writing this method in Java Write a method public static void removeDuplicates(ArrayList words) that removes duplicates from a list of strings. (The
I need help writing this method in Java
Write a method
public static void removeDuplicates(ArrayList words)
that removes duplicates from a list of strings. (The simplest approach is to create a second ArrayList without the duplicates, and then copy it back to the original array. Note that ArrayList has a method contains that tells you whether a given object is in the list, a method clear that removes all elements, and a method addAll that adds an entire collection to the list.)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
