Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
Write a constructor for ArrayList that accepts a standard Java array to initially populate List.
Write an equals() method that will work for any List implementation.
Write a toString() method that will work for any List implementation that prints the contents as a single line with values surrounded by square brackets and separated by commas. For example, "[A, B, C]" or "[]" for an empty List.
Create an Iterator that will work for any List implementation. What are the performance implications?
Update LinkedList to traverse backward if, when inserting and deleting, the desired index is more than halfway along the list.
Rewrite indexOf() so that it will work for any list.
Create a List implementation that is always empty and throws UnsupportedOperationException if an attempt is made to modify it.