Question
Option 2 : On the stack, in the method's stack frame / स्टैक पर, मेथड के स्टैक फ्रेम में
Detailed Solution
सही उत्तर On the stack, in the method's stack frame / स्टैक पर, मेथड के स्टैक फ्रेम में है।
Question:
In the Java Virtual Machine, where are a method's local primitive variables stored? / Java वर्चुअल मशीन में, किसी मेथड के स्थानीय प्रिमिटिव चर कहाँ संग्रहित होते हैं?
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 स्टैक पर एक स्टैक फ्रेम मिलता है, और स्थानीय चर (प्रिमिटिव सहित) उसी फ्रेम में रहते हैं। ऑब्जेक्ट स्वयं हीप पर रहते हैं; मेथड क्षेत्र क्लास मेटाडेटा रखता है।