课程: Java Exception Handling

今天就学习课程吧!

今天就开通帐号,24,700 门业界名师课程任您挑!

Error: Uncaught StackOverflowError

Error: Uncaught StackOverflowError - Java教程

课程: Java Exception Handling

Error: Uncaught StackOverflowError

- [Instructor] We are going to look at code that could trigger an error. Recall that an error is a subset of throwables. They are an object that can be thrown by an app indicating a serious problem. We will look specifically at a StackOverflowError and the best way to handle it. Errors are throwables that should not be handled by an app and indicate an unrecoverable issue with your application. StackOverflowError is an example of a VirtualMachineError indicating that the Java Virtual Machine or JVM has run out of some kind of resource. In this case, the stack for the app has overflowed. To see this error in action, I created an app that involves the Fibonacci sequence. The Fibonacci sequence is a mathematical series of numbers where each number in the series is the sum of the two preceding numbers. One plus one equals two, one plus two equals three, two plus three equals five, and so on. Now that we know what Fibonacci…

内容