In which JVM run-time data area are objects and arrays allocated?
Correct answer D. The heap
Explanation
The Java Virtual Machine Specification describes the heap as the run-time area from which memory for all class instances and arrays is allocated. It is shared by all threads and reclaimed by automatic storage management. Stacks hold frames with local variables and partial results, while the program counter records the current instruction of a thread.
Answer checked How we write and check questions
Discussion