Screw that.
Others have already pointed out the Google Guava library. This version is almost all just standard Java, just using Guava to create the list of numbers.
ArrayList<Integer> list = com.google.common.collect.Lists.newArrayList(1,2,3,4);
for (Iterator<Integer> it = list.iterator(); it.hasNext(); ) {if (it.next() % 2 == 0) {it.remove();}}
System.out.println(list);
Also, Java does have REPL. It's called the Eclipse scrapbook view. I'm sure Netbeans has something similar (and that is part of one of the standard Java SDK downloads).