asked 123k views
5 votes
How are arrays stored in memory?

asked
User Pradhan
by
7.9k points

1 Answer

3 votes

In Java, arrays are objects, therefore just like other objects arrays are stored in heap area. An array store primitive data types or reference (to derived data) types Just like objects the variable of the array holds the reference to the array.

Hope this helps Bruv

answered
User Sulav Timsina
by
8.1k points

No related questions found