Collection is a group of objects about which no
assumptions are made with regard to ordering or duplicate elements
List is a Collection that has an ordering
of its elements and allows duplicate elements
Set is the opposite of a List, in that there
is no ordering of the elements and duplicates are not allowed
List implementations are ArrayList
and LinkedList
Set implementations are HashSet,
LinkedHashSet, and TreeSet
Collection interfaces is the
Map interface
// interface types List<String> names = new ArrayList<String>(); Set<String> names = new TreeSet<String>(); // implementation types ArrayList<String> names = new ArrayList<String>(); TreeSet<String> names = new TreeSet<String>();