Question: Free-Response Questions: Write your answer in the space provided. 1. Write the output of the method: Terminal window printout: (Your answer goes here) 2. Write
Free-Response Questions: Write your answer in the space provided.

1. Write the output of the method: Terminal window printout: (Your answer goes here) 2. Write a method doubleTheList that creates and returns a new ArrayList filled with elements that are twice the value of every element in the parameter ArrayList. Example: ArrayList nums = new ArrayList(); nums.add(3.2); nums.add(2.5); nums.add(-1.1); ArrayList doubleNums = doubleTheList(nums); System.out.println(doubleNums);// prints [6.4, 5.0, -2.2] // pre: numList is not null and has at least one element // post: a new ArrayList containing the values in numList doubled public static ArrayList doubleTheList(ArrayList numList) { }
public static void main() { ArrayList
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
