Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and medical aesthetics - How to allocate memory when defining an integer array in java
How to allocate memory when defining an integer array in java

Hello, do you want to understand the internal mechanism of its operation? If not, it is like this

int[] array = new int[10];

This statement opens an integer array with a length of 10 in the memory. Of course, the addresses of arrays in memory are continuous. This is common sense, and you must know it.