I frequently asked questions in Java developer technical interviews. These answers are in the form of a summary, the important things are the questions. I recommended searching the question online for a comprehensive answer.
You can also watch this article as a video :
1-What are stack and heap?
The JVM divides the memory into two parts: stack memory and heap memory.
Stack is used to store the order of method execution and local variables.