Question: Instructions Complete the getOdds method so it returns a new ArrayList of Integers containing all odd Integers from the parameter ArrayList vals in the order


Instructions Complete the getOdds method so it returns a new ArrayList of Integers containing all odd Integers from the parameter ArrayList vals in the order they originally appeared. The contents of vals should not change For example if an ArrayList containing the Integers 2.5,8, 6, 7, 3, 12 in that order is passed as a parameter to getOdds, it should return an ArrayList containing the Integers 5,7, 3 in that order. Write your getOdds method in the U7 L2 Activity. Three class. Use the runner class to test your method but do not add a main method to your U7 L2 Activity Three.java file or your code will not be scored correctly. Files STATUS NOT SUBMITTED SAVE SUBMIT 2 UZ_L2_Activity_Three.java 4 runner_U7_L2_Activity_T... 1 - import java.util.ArrayList; 3 - public class U7_LZ_Activity Three 5. public static ArrayList
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
