import java.util.*; class UseArrayLists14 // Shows destructively removing the integer before all occurrences of // an integer in an ArrayList { public static void main(String[] args) throws Exception { Scanner input = new Scanner(System.in); System.out.println("Enter some numbers (all on one line, separated by spaces):"); String line = input.nextLine(); String[] numbers = line.split(" +"); ArrayList a = new ArrayList(); for(int i=0; i a,int m) // Removes the number which occurs before every occurrence of m in a, // does this destructively { int i=1; while(i