Trouble with arraylist and stack
- by helloman
I am having trouble starting out this program, I am suppose to write a program that will create an ArrayList, asking the user for 10 numbers. Then this will be put into the Array. Then after the list is made navigate it and if a number is even remove it from the ArrayList and copy it to a stack of integers.
import java.io.* ;
import java.util.*;
public class Test {
public static void main(String[] args){
Scanner input = new Scanner (System.in);
ArrayList<Integer> integers = new ArrayList<Integer>();
System.out.print ("Enter Number: \n");
for (int i = 0; i < 10; i++){
integers.add(input.nextInt());
}
for (int i = 0; i < 10 ; i++){
if (i %2==0)
}
}
}