04 Arrays Flashcards
Two things we need to remember when working with primitive arrays in Java.
it has to have a size and it is always dynamically allocated
It is a collection of entities with similar types.
Array
Arrays have to have a _____ when we initialize the array.
size
It refers to the memory allocated to the program while it is running, or in other words, during runtime.
Dynamic memory
To access the elements in a particular index, this is used.
indexing
Assigning values to the elements of the array requires indexing as well, with the use of the __________.
assignment operator
It is an array of arrays.
multi-dimensional array
In Java, you can declare a multi dimensional array by using two or more sets of brackets, such as
String[][]names
Each element must be accessed by a corresponding number of ___________.
index values
It cycles through an object collection, such as arrays in sequential manner, from start to finish.
for-each loop
It specifies the array type
type
It specifies the iterator variable that will accept the elements from the collection, from beginning to end, one at a time.
itrvar
It cycles through each of these arrays, displaying the value of each element.
inner for loop
It is a method available in the System class that can be used to copy data from one array to another efficiently.
arraycopy