logo CodeStepByStep logo

stutter

Language/Type: Java List Collections Iterator stutter
Related Links:

Write a method named stutter that accepts a List of integers as a parameter and that replaces every element with two of that value. For example, if the list stores the values [1, 8, 19, 4, 17] before the method is called, it should store the values [1, 1, 8, 8, 19, 19, 4, 4, 17, 17] after the method finishes executing.

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.