Write a method called removeZeroes that takes as a parameter an ArrayList of integers and eliminates any occurrences of the number 0 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.
public static void removeZeroes(ArrayList intList)
{
for(int i = 0; i < intList.size(); i++)
{
if(intList.get(i) == 0)
{
intList.remove(i);
i--;
}
}
}