Question: (Intro to java help?) Write a method markLength4 that takes an ArrayList of Strings as a parameter and that places a String of four asterisks

(Intro to java help?) Write a method markLength4 that takes an ArrayList of Strings as a parameter and that places a String of four asterisks ("****") in front of every String of length 4. For example, suppose that an ArrayList called "list" contains the following values:

(this, is, lots, of, fun, for, every, Java, programmer)

And you make the following call:

markLength4(list);

Then list should store the following values after the call:

(****, this, is, ****, lots, of, fun, for, every, ****, Java, programmer)

Notice that you leave the original Strings in the list (this, lots, Java) but include the four-asterisk String in front of each to mark it. You may assume that the ArrayList contains only String values, but it might be empty.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!