Originally posted by Kashif Riaz:
You know, this could have been tested ...
Well, yes, but you can't necessarily count on the results of this kind of test. You don't know if it's a quirk of the implementation, or if it's guaranteed behavior, until you read the documentation. From the
javadocs:
An ordered collection (also known as a sequence). The user of this interface has precise control over where in the list each element is inserted. The user can access elements by their integer index (position in the list), and search for elements in the list.