As thought in video array is getting stored in heap memory as we use NEW keyword. so what is getting stored in stack.
is stact storing the address of array??
WHAT IS GETTING STORE IN STACK?
Heap space in Java is used for dynamic memory allocation for Java objects and JRE classes at the runtime . New objects are always created in heap space and the references to this objects are stored in stack memory.