1 Difference between stack and heap memory is commo n programming question a sked by beginners learning Java or any other programming language.
2 to learn more about JVM options see my post 10 JVM option Java programmer should know . 3) If there is no memory left in stack for storing function ..
3 As I said, It’s important to understand what is heap and what is stack in Java and which kind of variables goes where, how you can run out of stack ..