+ 1
Arrays in java
Cn someone explain what are these and are they used for??
2 Answers
+ 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