What is recursion?
forExplanation
For this question, focus on the values, method rule, or definition stated in the prompt. The selected answer is the one that matches that trace exactly.
- B is not correct: it gives A loop that uses
for, but the trace or rule tested by the prompt leads to A method calling itself. - C is not correct: it gives A class with no methods, but the trace or rule tested by the prompt leads to A method calling itself.
- D is not correct: it gives An array with two dimensions, but the trace or rule tested by the prompt leads to A method calling itself.