1It usually happens when the stack pointer exceeds the stack bound. Usually due to deep infinite recursions
1 StackOverflowError is a runtime error in java.
2
3It is thrown when the amount of call stack memory allocated by JVM is exceeded.
4
5A common case of a StackOverflowError being thrown,
6is when call stack exceeds due to excessive deep or infinite recursion