作者:不点包子 | 来源:互联网 | 2023-09-01 09:43
Iknowthatlocalvariablesandparamtersofmethodsliveinstack,butInotabletofigureoutwhe
I know that local variables and paramters of methods live in stack, but I not able to figure out where does actually methods live in case of Java?
我知道局部变量和方法的参数都存在于堆栈中,但我无法弄清楚Java的实际方法在哪里?
If I declare any Thread object like:
如果我声明任何Thread对象,如:
Thread t=new Thread();
t.start();
So it means I've created a separate calling of methods apart from main method. What does it mean? Does it mean calling of separate sequence of methods over Stack memory? Am I right?
所以这意味着我除了main方法之外还创建了一个单独的方法调用。这是什么意思?这是否意味着在堆栈内存上调用单独的方法序列?我对吗?
6 个解决方案