Question: Write a method that accepts two ArrayLists of Strings as a parameter and returns a new ArrayList that contains a merge of the original two.
Write a method that accepts two ArrayLists of Strings as a parameter and returns a new ArrayList that contains a merge of the original two. In the merged list, you alternate strings from each list until you run ou of strings in one of the two lists. For example, if the first array list contains the Strings "a", "b", "c", " d ", and "en in that order and the second contains the strings " f " and " g ", your method should return the an ArrayList with the strings "a", "f", "b", "g in that order
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
