Arrays

studied byStudied by 4 people
0.0(0)
Get a hint
Hint

array

1 / 18

19 Terms

1

array

holds many items of the same type

New cards
2

initializer list

the values that you instantiate in an array

New cards
3

index numbers

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

New cards
4

traverse

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

New cards
5

null

the default value for every object

New cards
6

NullPointerException

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

New cards
7

Sequential search

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

New cards
8

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

New cards
9

selection sort

the selection sort searches and swaps

New cards
10

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

New cards
11

recursion

using a method to call itself

New cards
12

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

New cards
13

2D Arrays

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

New cards
14

Length property

Determines the number of elements in an array.

New cards
15

Length property is always one greater than the last Index.

True

New cards
16

Add() method

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

New cards
17

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

Listname(position, element);

Ie. myFriend(2,Kenny);

New cards
18

Clear() method

Removes all the elements in an array list

New cards
19

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

New cards

Explore top notes

note Note
studied byStudied by 7 people
... ago
5.0(1)
note Note
studied byStudied by 1 person
... ago
5.0(1)
note Note
studied byStudied by 85 people
... ago
5.0(1)
note Note
studied byStudied by 15 people
... ago
5.0(1)
note Note
studied byStudied by 3 people
... ago
5.0(2)
note Note
studied byStudied by 5 people
... ago
5.0(2)
note Note
studied byStudied by 18 people
... ago
5.0(1)
note Note
studied byStudied by 426 people
... ago
5.0(1)

Explore top flashcards

flashcards Flashcard (50)
studied byStudied by 57 people
... ago
5.0(1)
flashcards Flashcard (34)
studied byStudied by 45 people
... ago
5.0(1)
flashcards Flashcard (68)
studied byStudied by 2 people
... ago
5.0(1)
flashcards Flashcard (110)
studied byStudied by 37 people
... ago
5.0(3)
flashcards Flashcard (20)
studied byStudied by 4 people
... ago
5.0(3)
flashcards Flashcard (99)
studied byStudied by 15 people
... ago
4.0(1)
flashcards Flashcard (54)
studied byStudied by 12 people
... ago
5.0(1)
flashcards Flashcard (38)
studied byStudied by 11 people
... ago
5.0(1)
robot