Which of these will happen if recursive method does not have a base case?
A. An infinite loop occurs
B. System stops the program after some time.
C. After 1000000 calls it will be automatically stopped.
D. None of the mentioned
Answer:A
Which of these will happen if recursive method does not have a base case?
A. An infinite loop occurs B. System stops the program after some time. C. After 1000000 calls it will be automatically stopped. D. None of the mentioned
Explanation: If a recursive method does not have a base case then an infinite loop occurs which results in stackoverflow.