Ask Question
25 July, 23:56

When mehtod X calls method Y, method Y called methhod Z, and method Z calles method X, this is called

A. An error

B. Mutual recursion

C. tail recursion

D. indirect recursion

+4
Answers (1)
  1. 26 July, 00:41
    0
    D. Indirect Recursion.

    Explanation:

    Indirect recursion is when a method calls other method which calls the original method again.

    For example:-

    public static int mthd1 (int n)

    {

    if (n = = 0)

    return 0;

    else

    return (mthd2 (n-1));

    }

    public static int mthd2 (int n2)

    { return mthd1 (n2-1); }

    This is an example of indirect recursion. Where mthd1 calls mthd 2 and mthd 2 calls mthd 1 again.
Know the Answer?
Not Sure About the Answer?
Find an answer to your question ✅ “When mehtod X calls method Y, method Y called methhod Z, and method Z calles method X, this is called A. An error B. Mutual recursion C. ...” in 📘 Computers and Technology if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers