04 Arrays Flashcards

1
Q

Two things we need to remember when working with primitive arrays in Java.

A

it has to have a size and it is always dynamically allocated

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

It is a collection of entities with similar types.

A

Array

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

Arrays have to have a _____ when we initialize the array.

A

size

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

It refers to the memory allocated to the program while it is running, or in other words, during runtime.

A

Dynamic memory

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

To access the elements in a particular index, this is used.

A

indexing

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

Assigning values to the elements of the array requires indexing as well, with the use of the __________.

A

assignment operator

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

It is an array of arrays.

A

multi-dimensional array

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

In Java, you can declare a multi dimensional array by using two or more sets of brackets, such as

A

String[][]names

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

Each element must be accessed by a corresponding number of ___________.

A

index values

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

It cycles through an object collection, such as arrays in sequential manner, from start to finish.

A

for-each loop

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

It specifies the array type

A

type

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

It specifies the iterator variable that will accept the elements from the collection, from beginning to end, one at a time.

A

itrvar

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

It cycles through each of these arrays, displaying the value of each element.

A

inner for loop

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

It is a method available in the System class that can be used to copy data from one array to another efficiently.

A

arraycopy

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