Question: what is the difference between list and collection?
Answer: Collections are only iterable sequentially (and in no particular order) whereas a List allows access to an element at a certain position via the get(int index) method. Collection is the main interface of Java Collections hierarchy and List(Sequence) is one of the sub interfaces that defines an ordered collection.