This week's book giveaways are in the Refactoring and Agile forums. We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line! See this thread and this one for details.
In the API for this method it can be read: " ClassCastException - if the class of the specified element prevents it from being added to this Set. IllegalArgumentException - if some aspect of this element prevents it from being added to this Collection. " But you can't get a ListIterator for a Collection or Set compile-time type so I guess the words Set and Collection should be replaced by List, as in the ListIterator.set() method
SCJP2. Please Indent your code using UBB Code
posted 14 years ago
Yup, looks like an error. But fortunately it's easy enough to figure out what they meant. You can submit a bug report and your name will become immortalized in Java history.