boolean add(E e)
Lists that support this operation may place limitations on what elements may be added to this list. In particular, some lists will refuse to add null elements, and others will impose restrictions on the type of elements that may be added. List classes should clearly specify in their documentation any restrictions on what elements may be added.
add in interface Collection<E>e - element to be appended to this listCollection.add(E))UnsupportedOperationException - if the add operation
is not supported by this listClassCastException - if the class of the specified element
prevents it from being added to this listNullPointerException - if the specified element is null and this
list does not permit null elementsIllegalArgumentException - if some property of this element
prevents it from being added to this list