+ 1
Arrays in java
Cn someone explain what are these and are they used for??
2 Respostas
+ 5
âąArray is used to store a similar type of data.
âąAn array is a contiguous collection of homogeneous elements that can be accessed using an index.
âąarray is allocated on the heap
âąarrays in java store one of two things: either primitive values (int, char, âŠ) or references (a.k.a pointers). when an object is creating by using ânewâ, memory is allocated on the heap and a reference is returned.
âąArrays of char is also known as string.
+ 4
You just completed 4% of the java course, I'll recommend you to keep patience and continue learning.
https://docs.oracle.com/javase/tutorial/java/nutsandbolts/arrays.html