Need help with ArrayList and Stack please
<p>I am having trouble starting out this program. I am supposed to write a program that will populate an <code>ArrayList</code> by asking the user for 10 numbers.</p>

<p>After the list is made I'm to navigate it and if a number is even number, remove it from the <code>ArrayList</code> and put the number to a <code>Stack</code> of integers. So far I have this but I am confused on how to get the stack started so that I can put the even numbers into it:</p>

<pre><code>import java.io.* ;
import java.util.*;

public class Test {
    public static void main(String[] args) {
        Scanner input = new Scanner (System.in);

        ArrayList&lt;Integer&gt; test = new ArrayList&lt;Integer&gt;();
        Stack&lt;Integer&gt; myStack = new Stack&lt;Integer&gt;();

        System.out.print ("Enter Number: \n");

        for (int i = 0; i &lt; 10; i++) {          //Put Into ArrayList
            test.add(input.nextInt());
        }

        System.out.print("Contents of Array: " +  test );
        System.out.print("\n");

        for (int i= 0; i &lt; 10 ; i++) {
            int item = myIterator.getNext();
            if (item % 2 == 0) {
                myListIterator.remove(); //removes it from the ArrayList
                myStack.push(item); //puts it into the stack
            }

        }

        System.out.print("Contents of Array afer numbers removed: " +  test );
        System.out.print("\n");
    }
}
</code></pre>
