Java Arrays and ArrayList: Definitions, Operations, and Sorting Techniques

0.0(0)
Studied by 0 people
call kaiCall Kai
Locked
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/24

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 2:33 AM on 7/7/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai
Chat

No analytics yet

Send a link to your students to track their progress

25 Terms

1
New cards

| **Array Definition

A collection of like values that are indexed. It is an object in Java and can store only one data type at a time. |

2
New cards

| **Default Initialization

Numeric array elements are automatically initialized to 0; boolean arrays initialize to `false`; object references initialize to `null`. |

3
New cards

| **Array Size Declaring

Once created, an array's size cannot be changed. The size must be a non-negative integer. |

4
New cards

| **Bounds Checking

Java performs runtime bounds checking. Accessing an invalid index throws a runtime error (`ArrayIndexOutOfBoundsException`). |

5
New cards

| **The `length` Field

A built-in, read-only constant field containing the number of elements in the array. |

6
New cards

| **Enhanced `for` Loop

A specialized loop designed to iterate through every element of an array without using counters. |

7
New cards

| **Array Initialization

Declaring and populating an array simultaneously without explicitly using the `new` operator. |

8
New cards

| **Array Assignment Copying

Assigning one array variable to another only copies the reference, not the array object itself. |

9
New cards

| **True Array Cloning

To copy an array completely, you must copy individual elements or use cloning methods. |

10
New cards

| **Arrays as Arguments

When passed to methods, a reference to the array is passed. The method can modify the original array. |

11
New cards

| **Returning Arrays

A method can return a reference to a newly created array. |

12
New cards

| **String Arrays

Arrays storing references to String objects. Calling methods on uninitialized elements throws an error. |

13
New cards

| **Arrays of Objects

Arrays that store references to objects. Each element must be instantiated individually after the array is created. |

14
New cards

| **Sequential Search

A simple algorithm that steps through an array element by element until the target value is found or the end is reached. |

15
New cards

| **Parallel Arrays

Two or more arrays that contain related data, where elements at the same index correspond to each other. |

16
New cards

| **Two-Dimensional Arrays

An array of arrays, representing data organized in rows and columns. |

17
New cards

| **Ragged Arrays

A 2D array where the rows have different lengths. Created by allocating rows individually. |

18
New cards

| **Selection Sort

A sorting algorithm that finds the smallest element in the remaining unsorted portion and swaps it with the current index. |

19
New cards

| **Binary Search

A fast search algorithm that repeatedly divides a *sorted* array in half to find a target value. |

20
New cards

| **Command-Line Arguments

Arguments passed to the `main` method from the execution environment, stored in the `String[] args` array. |

21
New cards

| **The `ArrayList` Class

A class in the `java.util` package providing a dynamically resizing array-like structure. |

22
New cards

| **`ArrayList.add()`

Appends an item to the end of the list, or inserts it at a specified index. |

23
New cards

| **`ArrayList.size()`

Returns the number of items currently stored in the ArrayList. |

24
New cards

| *`ArrayList.get()` & `set()*` |

`get(index)` retrieves an item at a specific index. `set(index, item)` replaces an existing item. |

25
New cards

| **`ArrayList.remove()`

Removes an item at a specific index or removes the first occurrence of a specific object. |