java api add

Solutions on MaxInterview for java api add by the best coders in the world

showing results for - "java api add"
Vanessa
30 Aug 2018
1boolean add(E e)
2
3Appends the specified element to the end of this list (optional operation).
4
5Lists 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.
6
7Specified by:
8    add in interface Collection<E>
9Parameters:
10    e - element to be appended to this list
11Returns:
12    true (as specified by Collection.add(E))
13Throws:
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 
Sara Sofía
12 Feb 2016
1boolean add(E e)