Declaring arrays
What are arrays?
Max/Min/
Average
100

Do the indexes count from 1?

No, it counts from 0 to n-1.

100

Does using arrays instead of lots of variables save memory space?

Yes

100

What type of loop is best used when finding max, min and average in an array?

for loop

200

Can you change the length/size after when it is set?

No, once the size is set it can not be resized anymore. 

200

What happens if you try to access an index that doesn’t exist?

AOB error

200

The 'current max' is replaced by the value from the array when the current max is greater than or less than the value from the array?

less than

300

what is the general syntax

type [] arrayName = new type[length];
300

Are Java arrays homogeneous or heterogeneous data structures?

Homogenous data structures (data is the same type)

300

When finding the average in an array which variable needs to be initialized?

sum

400

What are the 3 things we need to know for declaring an array?

1. the data type that is storing in the array

2. the name of the array

3. the length/size of the array

400

Briefly describe what 2D arrays can be visualized like.

A table with rows and columns

400

When finding the average of an array in the for loop

for(int j=0;j< x ;j++);{

What is x?

length of the array

500

What are the two ways to initialize the elements?

1. using a for loop 

2. arrayName[index] = value;

500

Briefly describe two uses of arrays with methods that were covered.

1. Create, initialize and return a new array

2. Pass an existing array as a parameter and manipulate its values

500

How does the loop help to find the min in an array?

The loop goes through every value in the array and by using an if statement it compares the value to the 'current min' 

M
e
n
u