LearnFrenzy
Sign in Take a free test

Classes and Objects · Classes and Objects MCQ · Question 12

Where objects live in memory Answer, explanation & discussion

  • MCQ
  • Medium
  • 0 comments
  • Answer explained
  • Moderated community
Question 12 Back to Exercise

Where are objects and local reference variables stored?

  • A Both on the stack
  • B Objects on the heap; local reference variables in the method's stack frame Correct
  • C Both on the heap
  • D Objects in registers
Correct Answer: Option B

Fields of an object are stored inside the object, on the heap.

Discussion & Comments 0

Share your method, a shortcut, or ask about a step you didn't follow.

No comments yet. Be the first to share your solution!

Post your comment

Comments appear after a quick review by our team.

Search LearnFrenzy

Esc

Quick links