Unit 7: ArrayLists

0.0(0)
studied byStudied by 1 person
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/23

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

24 Terms

1
New cards
ArrayList
A resizable array implementation of the List interface in Java that can store references to objects.
2
New cards
Capacity
The size of the internal array used by an ArrayList.
3
New cards
Size
The number of elements currently stored in an ArrayList.
4
New cards
Auto-boxing
The automatic conversion of primitive types to their corresponding wrapper classes when added to a collection like ArrayList.
5
New cards
Unboxing
The automatic conversion of wrapper class objects back into their corresponding primitive types.
6
New cards
IndexOutOfBoundsException
An exception that occurs when trying to access an index that is outside the range of valid indices for an ArrayList.
7
New cards
Sequential Search
A searching algorithm that looks for a target element by checking each element from the beginning until the target is found or the end is reached.
8
New cards
Selection Sort
A sorting algorithm that divides the array into a sorted and unsorted region and repeatedly selects the minimum from the unsorted region to add to the sorted region.
9
New cards
Insertion Sort
A sorting algorithm that builds a sorted section of the array by incrementally inserting elements from the unsorted section into their correct position.
10
New cards
Enhanced For Loop
A simpler way to iterate over elements in a collection without using an index.
11
New cards
get() Method
A method to retrieve the object located at a specified index in an ArrayList.
12
New cards
add() Method
A method used to add an element to the end of the ArrayList or at a specified position.
13
New cards
set() Method
A method to replace the element at a specified index in an ArrayList with a new element.
14
New cards
remove() Method
A method that removes the element at a specified index from the ArrayList.
15
New cards
while Loop Traversal
A method of traversing an ArrayList that can be used to safely remove elements while avoiding IndexOutOfBoundsException.
16
New cards
Reverse Loop Traversal
A method of traversing an ArrayList from the last index to the first to safely remove elements.
17
New cards
getOutliers Method
A method that identifies scores in an array that are significantly above or below the average.
18
New cards

add() Method Syntax

arrayList.add(element); or arrayList.add(index, element);

19
New cards

get() Method Syntax

arrayList.get(index);

20
New cards

set() Method Syntax

arrayList.set(index, element);

21
New cards

remove() Method Syntax

arrayList.remove(index);

22
New cards

Sequential Search

A searching algorithm that looks for a target element by checking each element from the beginning until the target is found or the end is reached.

23
New cards

Selection Sort

A sorting algorithm that divides the array into a sorted and unsorted region and repeatedly selects the minimum from the unsorted region to add to the sorted region.

24
New cards

Insertion Sort

A sorting algorithm that builds a sorted section of the array by incrementally inserting elements from the unsorted section into their correct position.