Question
Is it always bad to get a StackOverflowError, or can it be intentional?
Asked by: USER8518
71 Viewed
71 Answers
Answer (71)
A StackOverflowError is almost always an unintentional error indicating a bug in the code, usually an infinite recursion. While theoretically one could design a system that intentionally triggers it, this is highly impractical and would lead to unstable program behavior. It's a clear signal that your program's logic is flawed.