Skip to content

Latest commit

 

History

History
14 lines (14 loc) · 546 Bytes

File metadata and controls

14 lines (14 loc) · 546 Bytes

1. add(elem) → add at end.

2. add(index, elem) → insert at position.

3. get(index) → access element.

4. set(index, elem) → replace element.

5. remove(index) → remove by position

6. remove(Object o) → remove by value.

        fruits.remove("Mango");  // removes "Mango" from the list

7. size() → number of elements.

8. isEmpty() → check if list is empty.

9. clear() → remove all elements.

10. contains(elem) → check if element exists.

11. indexOf(elem) → find first index of element.