Some problems using ArrayLists...

0. Write a method called printArrayList. It should take an ArrayList as its lone input and print its contents, separated by spaces, on a single line. After the contents are all printed, then a System.out.println() should be done to print a newline. It does not return anything.

1. Write a method called sum that takes an ArrayList<Double> as its input and returns the sum of its elements.

2. Write a method called removeStringsWithDigits that takes an ArrayList<String> as its lone input and deletes all Strings that contain a digit (0..9) from the ArrayList. It does not return anything.

3. What does the following code print?

		ArrayList<ArrayList<Integer>> matrix = new ArrayList<ArrayList<Integer>>();
		ArrayList<Integer> a0 = new ArrayList<Integer>();
		ArrayList<Integer> a1 = new ArrayList<Integer>();
		ArrayList<Integer> a2 = new ArrayList<Integer>();

		matrix.add(a0);
		matrix.add(a1);
		matrix.add(a2);
		a0.add(8);
		a0.add(1);
		a0.add(6);
		a1.add(3);
		a1.add(5);
		a1.add(7);
		a2.add(4);
		a2.add(9);
		a2.add(2);
		for (int i = 0; i < matrix.size(); i++) {
			printArrayList(matrix.get(i));  // assumes printArrayList from problem 0
		}