Vocabulary
Array Creation
Traversing an Array
100

What is an array?

A data structure to create a collection or list
100

String [] cars;


What type of primitive data would be stored in this array?

Strings

100

The first element in an array is accessed using this index.

0

200

What are the default values of an int array and double array?

0 & 0.0

200

int[] grades = {100,20,44,98,76,22}

System.out.print(grades[4]));


What is the output?

76

200

What type of loop is used to be more detailed when traversing an array?

For loop

300

A single value in an array is an 

Element

300
public static int mystery(int [] arr)

{

return arr[1] + arr[3] /2;

//The mystery method has been called for this array

int[] list = {3,5,3,6,6}

8

300

In javaScript, this loop is designed to work through the array without using an index..

An enhanced for loop / for each loop

400
{1,2,3,4,5,6}

What is the length of the array?

What is the element in the 6 index spot?

400

String [] names = {John,Sally,Mark,Louise}

System.out.println(names[2]));

Error

400

What does it mean to traverse an array?

To process each element in array one by one

500

What would I type in order to find the index of the last element?

list.length-1

500

What would I code to find the middle index of an arr. You may assume that the length of the arr is odd

arr[arr.length /2]

500

What type of loop would you use to traverse an array when you don't know the length?

While
M
e
n
u
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500