Solved

Example Code Ch 12-1

Question 45

Multiple Choice

Example Code Ch 12-1
Given the following recursive method:
public int question1_2(int x, int y)
{
if (x == y) return 0;
else return question1_2(x-1, y) + 1;
}
-Refer to Example Code Ch 12-1: Calling this method will result in infinite recursion if which of the following conditions is initially true?


A) (x == y)
B) (x != y)
C) (x > y)
D) (x < y)
E) (x == 0) && (y != 0)

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions