Please enable JavaScript.
Coggle requires JavaScript to display documents.
ARRAYS - Coggle Diagram
ARRAYS
To create an array in Java, you must do the following:
-
-
-
Accessing Array Elements
testScore[40] = 920;
This statement sets the 41st element of the testScore array to a value of 920,
-
Changing Array Elements
When you move around values inside arrays, you are reassigning the reference rather than copying a value from one slot to another
An array allows you to store a list of items that have the same primitive data type, the same class, or a common parent class
Each item on the list goes into its own numbered slot so that you can easily access the information.
An array can contain any type of information that is stored in a variable, but after the array is created, you can use it for that information type only.