1booleanadd(E e)23Appends the specified element to the end of thislist(optional operation).
45Lists 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.
8 add in interface Collection<E>
10 e - element to be appended to this list
12true(as specified by Collection.add(E))
14 UnsupportedOperationException - if the add operation is not supported by this list
15 ClassCastException - if the class of the specified element prevents it from being added to this list
16 NullPointerException - if the specified element is null and this list does not permit null elements
17 IllegalArgumentException - if some property of this element prevents it from being added to this list