posted 18 years ago
ArrayList says: The size, isEmpty, get, set, iterator, and listIterator operations run in constant time. The add operation runs in amortized constant time, that is, adding n elements requires O(n) time. All of the other operations run in linear time (roughly speaking). The constant factor is low compared to that for the LinkedList implementation.
LinkedList says: The class implements the Queue interface, providing first-in-first-out queue operations for add, poll, etc. Other stack and deque operations could be easily recast in terms of the standard list operations. They're included here primarily for convenience, though they may run slightly faster than the equivalent List operations.
Unless things have changed drastically, however, I highly doubt you'll see a question on the exam that asks which provides a faster Iterator. It's certainly not covered in the objectives.
[ September 28, 2005: Message edited by: Steve Morrow ]