From chapter 3, Review question #1:
Suppose that you have a collection of products for sale in a database and you need to display those products. The products are not unique. Which of the following collection classes in the package best suit your needs for this scenario?
A. Arrays
B. ArrayList
C. HashMap
D. HashSet
E. LinkedList
My answer: A,E
Correct answer:A
According to the solution
"LinkedList is both a list and a Queue"
, and no further explanation is given.
In my opinion LinkedList is perfectly fine for the job, and you would chose it over ArrayList if you needed to access it in a sequential manner rather than randomly. Which would be the case if there was a GUI showing the products in a form style, like Access does (there is a database, so why wouldn't there be a GUI?). Now for a normal console printout, granted it would be less performant, but there are other questions where Vector is shown to implement List as well, albeit it has all the synchronization overweight, and is given as valid, so I think any List would be a correct answer here, considering the question has multiple possible answers.
The excuse given in the answer, that LinkedList does not qualify for being also a Queue, is a poor one, for we don't care which other functionality does a class offer as long as it covers our use case.
I find this answer arbitrary and unfair. I really hope Oracle doesn't come up with questions like these in the real exam.