Stackoverflowerror is an error, not an exception.
Method is placed in the stack space. By default, it is only 512k-1024k. By making recursive calls, you can fill up the stack space.
public class StackOverFlowErrorDemo {
public static void main(String[] args) {
// Exception in thread "main" java.lang.StackOverflowError
stackOverflowError();
}
private static void stackOverflowError() {
stackOverflowError();
}
}
Read More:
- How to Solve JVM Common Errors: outofmemoryerror & stackoverflowerror
- [Solved] Initialization of anonymous inner class member variable causes java.lang.stackoverflowerror
- [Solved] Method threw ‘java.lang.StackOverflowError‘ exception. Cannot evaluate
- Java.lang.stackoverflowerror error [How to Solve]
- [Solved] IDEA startup Error: Java lang.StackOverflowError
- nested exception is java.lang.StackOverflowError [How to Solve]
- Lotti triggered Java lang.StackOverflowError [How to Solve]
- Dubbo Error: getPropertyValue: inconsistent stack height -1
- [Solved] Hibernate Error: java.lang.StackOverflowError at java.lang.Integer.toString(Integer.java:402)
- [Solved] springsecurity custom exceptions: Error: Parse Error: Response overflow
- Java Error: No enclosing instance of type Main is accessible. Must qualify the allocation with an encl
- [Solved] ZK Connect Error: A JNI error has occurred, please check your installation and try again
- Three ways of thread sequence alternate execution in Java lock free programming
- Explicit and implicit conversion of Java data type
- How to convert a Java string into a number (stringtonumber)
- [Solved] Springboot2.x ElasticSearch Error: availableProcessors is already set to [4], rejecting [4]
- Java uses single thread pool to realize multi thread sequential execution (non alternating, non synchronous)
- [PROJECT] itdage java to get the weather and send text messages
- Problems and causes of Java’s main function format (public static void main (string args()))
- Abstract method and static method of java interface