Question: Write a method called removeZeros that takes as a parameter an ArrayList of integers and eliminates any occurrences of the number zero from the list.
Write a method called removeZeros that takes as a parameter an ArrayList of integers and eliminates any occurrences of the number zero from the list. For example, if the list stores the values [0, 7, 2, 0, 0, 4, 0] before the method is called, it should store the values [7, 2, 4] after the method finishes executing
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
