1/26
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 that can store references to objects but not primitive data types.
Wrapper Classes
Classes that encapsulate primitive data types within objects, such as Integer and Double.
Integer
The wrapper class for the primitive type int.
Double
The wrapper class for the primitive type double.
Auto-boxing
The automatic conversion that the Java compiler makes between primitive types and their corresponding wrapper classes.
Unboxing
The conversion of a wrapper object back to its corresponding primitive type.
size()
A method that returns the number of elements in an ArrayList.
add(E obj)
Method that appends an object to the end of an ArrayList.
add(int index, E obj)
Inserts an object at the specified index in an ArrayList.
get(int index)
Method that retrieves the element at a specified position in an ArrayList.
set(int index, E obj)
Replaces the element at a specified index in an ArrayList with a new object.
remove(int index)
Method that removes the element at the specified index in an ArrayList.
IndexOutOfBoundsException
Exception thrown when trying to access an index that is out of range of an ArrayList.
for loop
A traditional loop used for iterating over an ArrayList with access to the index.
Enhanced for loop
A simplified way to iterate over an ArrayList without needing index access.
Linear Search
An algorithm for finding an element in an ArrayList by checking each element sequentially.
Traverse Backwards
A method for removing elements from an ArrayList by iterating from the end toward the beginning.
ConcurrentModificationException
Exception thrown when an ArrayList is modified while iterating over it using an enhanced for-loop.
Object Comparison
The practice of using .equals() instead of == for comparing objects to check for content equality.
Conditional Increment
A technique used in loops to avoid incrementing the index when an element is removed.
Generic Type Parameter
A placeholder used in ArrayLists to specify the type of elements they will hold.
void
A return type that indicates no value is returned from a method.
Deprecated
Refers to a method or feature that is no longer recommended for use and might be removed in future versions.
intValue()
Method that retrieves the primitive int value from an Integer object.
new Integer(int)
A constructor for creating an Integer object, though it's deprecated in newer versions of Java.
ArrayList
Syntax used to declare an ArrayList in Java, where E specifies the type of elements.
Shifting Indices
The process that occurs in an ArrayList when elements are added or removed, affecting the positions of subsequent elements.