Difference between “call stack” and “thread stack”

前端 未结 4 1683
粉色の甜心
粉色の甜心 2021-02-01 08:42

Is there a semantic difference between the terms call stack and thread stack, in Java multithreading?

4条回答
  •  耶瑟儿~
    2021-02-01 09:23

    Each thread has its own stack, each method call uses a new area of that stack. This means when a method calls itself (recursion), it will have a new set of local variables.

提交回复
热议问题