Multiple choice softskills leadership

where are the instance variables defined in Class stored in Ram??

  1. Static Data Blocks

  2. Stack

  3. Heap

  4. kernal

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

In Java, all objects and their associated instance variables are stored on the Heap. The Stack is used for local variables and method execution frames, while static variables are stored in the Method Area (part of the heap in newer JVMs).