Java tutorial
//package com.java2s; import java.util.ArrayList; import java.util.Iterator; public class Main { public static void removeFromList(ArrayList<Integer> e, int dato) { for (Iterator<Integer> iter = e.listIterator(); iter.hasNext();) { int a = iter.next(); if (a == dato) { iter.remove(); } } } }