In this tutorial we will discuss about the StackOverflowError in Java. This error is thrown to indicate that the application’s stack was exhausted, due to deep recursion. The StackOverflowError extends the VirtualMachineError class, which indicates that the JVM is broken, or it has run out of resources and cannot operate. Furthermore, the the VirtualMachineError extends the Error class, which is used to indicate those serious problems that an application should not catch. A method may not declare such errors in its throw clause, because these errors are abnormal conditions that shall never occur.