InterviewSolution
Saved Bookmarks
| 1. |
Where is a new object allocated memory?(a) Young space(b) Old space(c) Young or Old space depending on space availability(d) JVM |
|
Answer» Correct option is (a) Young space Easiest explanation: A new object is always created in young space. Once young space is full, a special young collection is run where objects which have lived long enough are moved to old space and memory is freed up in young space for new objects. |
|