Arrays

0.0(0)
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/18

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

19 Terms

1
New cards

array

holds many items of the same type

2
New cards

initializer list

the values that you instantiate in an array

3
New cards

index numbers

locations that are used to assign to each element found in the array

4
New cards

traverse

the way an element in a data structured is accessed, or modified

5
New cards

null

the default value for every object

6
New cards

NullPointerException

since null isn’t a valid object, the code performed on null will result in this

7
New cards

Sequential search

goes in order through each value until the desired one is found

8
New cards

Binary search

requires an ordered list of values, and every time it cuts the list of values in half until it finds the desired value

9
New cards

selection sort

the selection sort searches and swaps

10
New cards

merge sort

uses recursion, this type of sort divides and conquers, the array gets split into 2 pieces and then it is sorted, the 2 sorted pieces than come together to form one sorted list

11
New cards

recursion

using a method to call itself

12
New cards

insertion sort

the array is split into a sorted and unsorted part, the values from the unsorted part are placed at the correct position in the sorted part

13
New cards

2D Arrays

an array that holds items in a 2 dimensional grid, it’s storing items in rows and columns

14
New cards

Length property

Determines the number of elements in an array.

15
New cards

Length property is always one greater than the last Index.

True

16
New cards

Add() method

Appends one element to the end of an ArrayList, which gives it the highest index number.

17
New cards

How do you specify the location of an element with the add() function.

Listname(position, element);

Ie. myFriend(2,Kenny);

18
New cards

Clear() method

Removes all the elements in an array list

19
New cards

Remove(int index)

The element that needs to be remove needs to be specified.

Ie. myFriend(0): removes the first item and myFriend(4) removes the fifth item