Originally posted by frank yang:
My question if two statement below
Q1 The elements in the collection are guaranteed to be unique.
Elements in a
Set are guaranteed to be unique. Collection is a super-interface of Set. List is also a Collection and can contain duplicate values.
Q2 The elements in the collection are accessed using a unique key.
No, elements in a Map are accessed using a unique key. Elements in a collection are accesed using an Iterator. Although elements in a List can also be accessed using an index.
HTH,
Paul.