Question
JAVA L2A3 Complete the getEvens method so it returns a new ArrayList of Integers containing all even Integers from the parameter ArrayList vals in the
JAVA L2A3
Complete the getEvens method so it returns a new ArrayList of Integers containing all even 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 1,2,4,5,7 in that order is passed as a parameter to getEvens, it should return an ArrayList containing the Integers 2,4 in that order.
Write your getEvens 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.
what i have so far:
import java.util.ArrayList;
public class U7_L2_Activity_Three {
public static ArrayList
}
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started