1/14
These flashcards cover key vocabulary and definitions related to the ArrayList and Collection data structures, focusing on their implementation and functionalities as discussed in the lecture.
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai |
|---|
No analytics yet
Send a link to your students to track their progress
ArrayList
A resizable array implementation of the List interface that can grow and shrink dynamically.
FixedSizeArrayList
A fixed-size array implementation of the List interface that does not allow dynamic resizing.
Collection Interface
Represents a group of objects known as elements, with methods for adding, removing, and querying the collection.
List Interface
Extends the Collection interface to provide methods for accessing elements by their position in the list.
grow(int currentCapacity)
Method in ArrayList that expands the array size by 50% when the current size exceeds the current capacity.
System.arraycopy()
A method used to efficiently copy elements from one array to another, optimized for performance.
trimToSize()
A method in ArrayList that reduces the size of the underlying array to the current number of elements.
left shift (<<)
A bit-wise operation that multiplies a number by 2 for each position the bits are shifted to the left.
right shift (>>)
A bit-wise operation that divides a number by 2 for each position the bits are shifted to the right.
currentCapacity
The current length of the array or the capacity of the array in an ArrayList.
size()
Method that returns the number of elements currently held in a collection or list.
add(T): boolean
Method in Collection interface to add an element to the collection.
remove(T): boolean
Method in Collection interface to remove a specified element from the collection.
isEmpty(): boolean
Method in Collection interface that checks if the collection contains no elements.
clone()
Method that creates a copy of the array or the collection, returning a new instance.