Can someone please expand on what does it mean by in non-primitive array objs are stored in heap segment in the below line?
“In primitive array, values are stored in a contiguous memory location. Whereas, in the non-primitive array, objects are stored in the heap segment.”
Isn’t non-primitive array is still an array of Java objects which are accessed using index? For ex:
Employee employees = new Employee;
employees = new Employee(…);