Unit 3 - Arrays Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

data structure

A

a storage that is used to store and organize related data

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

array

A

a numbered list that stores related data items (same type)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

ArrayList

A

a resizable array

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

dynamic resizing

relateds to Array:Lists

A

the ArrayList grows as items are added and shrinks when items are removed

array is fixed in size

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

element

A

an item in an array

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

index

A

the location/position of an item in an array

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

length

instance variable called field

A

the number of elements in an array

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

initializer

A

can set the elements of the array, a common-separated list of expressions enclos in braces

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

bounds checking

off-by-one error

A

making sure array indices are greater than or equal to 0 and less than the length of the array; out of bounds b/c index is too high or too low

singular - index, plural - indices

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

enhanced for statement

a.k.a for-each loop

A

a special loop that iterates through the elements of an array without using a counter, it avoids the possibility of “stepping outside” of the array
ex. for (parameter : arrayName)
statement

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

pass-by-value

call-by-value

A

a copy of an argument’s value is passed to the called method; the method uses the the copy and the original value is not changed

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

pass-by-reference

call-by-reference

A

a reference of the argument’s value is passed to the method; the method can access the actual parameter and modify its value

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

two-diemensional array

a.k.a matrix

A

used to represent table of values consisting of information arranged in rows and columns

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

command-line arguments

A

is an argument passed at the time of running the program

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Array class

A

a class from the java utility package that provides static methods for common array manipulations

How well did you know this?
1
Not at all
2
3
4
5
Perfectly