Which of these packages contains the exception StackOverflow in Java?

Java MCQ: Which of these packages contains the exception StackOverflow in Java?

a) java.lang
b) java.util
c) java.io
d) java.net

Answer:

a) java.lang

Explanation:

The StackOverflowError in Java is part of the java.lang package. It is thrown when a stack overflow occurs because an application recurses too deeply.

Reference links:

https://www.rameshfadatare.com/learn-java-programming/
https://www.javaguides.net/p/java-tutorial-learn-java-programming.html

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top