Methods Flashcards
compare()
compares two arrays
copyOf()
Creates a copy of an array with a new length
deepEquals()
Compares two multidimensional arrays to check whether they are deeply equal to each other
equals()
Checks if two arrays are equal
fill()
Fills an array with a specified value
mismatch()
Returns the index position of the first mismatch/conflict between two arrays
sort()
Sorts an array in ascending order
Array List Methods
add()
Add an item to the list
boolean|void
addAll()
Add a collection of items to the list
boolean
clear()
Remove all items from the list
void
clone()
Create a copy of the ArrayList
Object
contains()
Checks whether an item exist in the list
boolean
ensureCapacity()
Increase the capacity of the list to be able to fit a specified number of items
void
forEach()
Increase the capacity of the list to be able to fit a specified number of items
void
forEach()
Perform an action on every item in the list
void
get()
Return the item at a specific position in the list
T
indexOf()
Return the position of the first occurrence of an item in the list
int
isEmpty()
Checks whether the list is empty
boolean
iterator()
Return an Iterator object for the ArrayList
Iterator
lastIndexOf()
Return the position of the last occurrence of an item in the list
int
listIterator()
Return a ListIterator object for the ArrayList
ListIterator
remove()
Remove an item from the list
boolean|T