1.

The Object array is created in _____________________(a) Heap memory(b) Stack memory(c) HDD(d) ROMThe question was asked during a job interview.My question is from Object Array topic in division Object of Object Oriented Programming

Answer»

The correct option is (a) HEAP memory

To explain I would SAY: If the object arrays are DECLARED dynamically, then the memory will be reserved on heap. The memory for objects will be on stack only if some constructor or some call and RETURN tasks are happening. The program doesn’t run on HDD and ROM is not used for the execution of PROGRAMS.



Discussion

No Comment Found

Related InterviewSolutions