1/12
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai |
|---|
No analytics yet
Send a link to your students to track their progress
ArrayList
Is a resizable array-like data structure in programming, most commonly associated with Java.
ArrayList
It allows you to store elements in an ordered collection, and unlike a regular array, its size can grow or shrink dynamically as you add or remove elements.
add(E element)
Adds an element to the end of the list.
add(int index, E element)
Inserts an element at a specified index.
get(int index)
Returns the element at a specified index.
set(int index, E element)
Replaces the element at a specified index with a new element.
remove(int index)
Removes the element at a specified index.
remove(Object o)
Removes the first occurrence of a specified object from the list.
size()
Returns the number of elements in the list.
isEmpty()
Checks if the list is empty.
contains(Object o)
Checks if the list contains a specified object.
ArrayList
Specifies that you are creating an instance of
the ArrayList class.
<DataType>
This is the "diamond operator" and specifies the type of elements that the ArrayList will hold.