Home / Questions / Example: StackOverflowError
Explanatory Question

Example: StackOverflowError

👁 30 Views
📘 Detailed Answer
🕒 Easy to Read
Read the answer carefully and go through the related questions on the right side to improve your understanding of this topic.

Answer with Explanation


public class ErrorExample1 {
    public static void recursive() {
        recursive(); // Infinite recursion
    }

    public static void main(String[] args) {
        recursive();
    }
}