Andr7st

Andr7st

What an array is: contiguous memory, fixed size and indexes

What an array is: contiguous memory, fixed size and indexes

What the JVM reserves when you write new int[10]: an object on the heap with a fixed length, contiguous cells, default values and an index that starts at zero. Includes why length is a field and not a method, and where ArrayIndexOutOfBoundsException comes from.


Written by
Andrés Segura
Id

jaa01

Posted

Sep 23, 2026

Updated

Aug 26, 2026

Reading time

6 min

java
arrays
fundamentals
memory
On this page
Loading...