StackOverflowError or OutOfMemoryError?
QuizEasy-MediumJava onlyAsked in: Capgemini, TCS, Wipro
Which statements are true? Pick all that apply.
- A method that calls itself with no stopping condition ends with
StackOverflowError - Adding objects to a static list forever ends with
OutOfMemoryError - Both are subclasses of
Exception catch (Exception e)catches a StackOverflowError
This question is part of Pro+
Pro+ opens every question in Interview Prep and the mock interview. Every article and the first 2 questions of each topic stay free. Hands-on Selenium and API tasks follow their course lesson's own lock.