Question: Problem: Write a method that will make all of the odd values in the list even. Data: A list containing 0 or more values. The

Problem: Write a method that will make all of the odd values in the list even.

Data: A list containing 0 or more values. The list will not point at null.

Output: All odd values in the list will be changed to even.

Help: The method for this problem does not return nor print anything. Yoiu must change the values in the list that was passed in.

Starting List 1, 2, 3, 4, 5 -3, 7, -134 2, 2

Ending List 2, 2, 4, 4, 6 -2, 8, -134 2, 2 STARTER CODE: public void go( List vals ) { // your code goes here }

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!