arrays Flashcards
1
Q
array length
A
number of elements in array
2
Q
array index
A
location of element. ALWAYS starts at 0
3
Q
array declaration
A
[] . declaration establishes scope, but remember to alocate memory before use.
4
Q
array allocation
A
= new [length/size]
5
Q
new keyword
A
ALLOCATE memory for an object
6
Q
index range of array
A
0 to (Object.length-1)
7
Q
easy way to initalize array values
A
array = {num1, num2…}. must be done with array declaration
8
Q
for-each loop
A
for(double d:aDarray)
variables must match type
9
Q
two dimensional array
A
single dimensional array in which each element is its own array