This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
In the Collection interface, there is only one add method. This takes a single argument (the Element being added).
Collection is a superinterface of the List interface. In List, the interface is expanded to include an overloaded version of the add method. This takes two arguments (an int index, along with the Element being added).
By upcasting to the Collection type, the overloaded version of add (in List) becomes unavailable, and generates the compiler error.