Question

1.
2.
3.
4.
Answer (Detailed Solution Below)

Option 2 : On the stack, in the method's stack frame / स्टैक पर, मेथड के स्टैक फ्रेम में

Advertisement

Detailed Solution

सही उत्तर On the stack, in the method's stack frame / स्टैक पर, मेथड के स्टैक फ्रेम में है।

Key Points
Helpful?
PrepSnapprepsnap.in • Part -A

Question:

In the Java Virtual Machine, where are a method's local primitive variables stored? / Java वर्चुअल मशीन में, किसी मेथड के स्थानीय प्रिमिटिव चर कहाँ संग्रहित होते हैं?

1.
On the heap / हीप पर
2.
On the stack, in the method's stack frame / स्टैक पर, मेथड के स्टैक फ्रेम में
3.
In the method area / मेथड क्षेत्र में
4.
In the native method stack / नेटिव मेथड स्टैक में

Correct Answer: On the stack, in the method's stack frame / स्टैक पर, मेथड के स्टैक फ्रेम में

Each method invocation gets a stack frame on the JVM stack, and local variables (including primitives) live in that frame. Objects themselves live on the heap; the method area holds class metadata. / प्रत्येक मेथड आह्वान को JVM स्टैक पर एक स्टैक फ्रेम मिलता है, और स्थानीय चर (प्रिमिटिव सहित) उसी फ्रेम में रहते हैं। ऑब्जेक्ट स्वयं हीप पर रहते हैं; मेथड क्षेत्र क्लास मेटाडेटा रखता है।

Downloaded from PrepSnap (prepsnap.in)