Tail Recursion Optimization
Which statement best describes tail recursion optimization in Java?
Imagine a scenario where you repeatedly execute a similar action without needing to perform any additional operations after the call. This is typical in tail recursive methods.
A
Tail recursion eliminates the need for a base case in a recursive method.
B
Tail recursion optimization allows the compiler to reuse the current function’s stack frame for the recursive call, thereby reducing stack usage.
C
Tail recursion optimization increases the number of recursive calls, which often leads to a stack overflow.
D
Tail recursion forces the recursive call to be executed before any other operations in the calling function.
Question Leaderboard
Not enough data yet to show leaderboard.
APFIVE