+ 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