Do the indexes count from 1?
No, it counts from 0 to n-1.
Does using arrays instead of lots of variables save memory space?
Yes
What type of loop is best used when finding max, min and average in an array?
for loop
Can you change the length/size after when it is set?
No, once the size is set it can not be resized anymore.
What happens if you try to access an index that doesn’t exist?
AOB error
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
what is the general syntax
Are Java arrays homogeneous or heterogeneous data structures?
Homogenous data structures (data is the same type)
When finding the average in an array which variable needs to be initialized?
sum
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
Briefly describe what 2D arrays can be visualized like.
A table with rows and columns
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
What are the two ways to initialize the elements?
1. using a for loop
2. arrayName[index] = value;
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
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'