OK, please post questions/comments related to today's class in the Comments.
I wanted to correct one thing I said in class about Interfaces.
When you assign to a variable whose type is an Interface name, you've got to make it refer to an actual object, and every object is an instance of an actual Class. So, to initialize a List<String> variable, you can't write:
List<String> myList = new List<String> ( );
You'll get a compile time error, pointing out that there is no such constructor because List is an interface, not a class. Instead, do something like:
List<String> myList = new ArrayList<String> ( ); // or
List<String> myList = new LinkedList<String> ( );
Again, when the type of a variable is an Interface, the variable (if non-null) will always refer to an instance of some implementing class.
Here's an exercise to think about:
Write a List class called SilentArrayList that acts like ArrayList except:
If the user tries to set or get a value that is out of range (>= this.size( )), instead of throwing an exception, it just silently fails, returning a null reference in the get case.
There are some technical issues involving the type of item to be stored, but try not to get too hung up about those for now, even though they need to be handled right if you want your solution to compile.