Question: Please help The assignment is the following Write a method called doubleList that takes an ArrayList of strings as a parameter and replaces every string
Please help
The assignment is the following
Write a method called doubleList that takes an ArrayList of strings as a parameter and replaces every string with two of that same string. For example, if the list stores the values ["how", "are", "you?"] before the method is called, it should store the values ["how", "how", "are", "are", "you?", "you?"] after the method finishes executing. Print content of ArrayList before and after the method call.
What I have so far:
import java.util.ArrayList;
public class DoubleList { ArrayList
ScreenShot:
Q 61-1-* * DoubleList.java X 1 import java.util.ArrayList; E Be Outline x 619 DoubleList arrList : ArrayList
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
