Practice · 2 of 5
Filter into a new list
CHALLENGE
Difficulty: beginner+25 XP
Implement ArrayList<Integer> odds(ArrayList<Integer> nums): a NEW list holding only the odd values, in order. The source list must be unchanged, and nums may be empty.
Press Submit to check your solution.
Back to lesson: Practice: List practice