Solved

Consider the Recursive Method MyPrint: Public Void MyPrint(int N)

Question 64

Multiple Choice

Consider the recursive method myPrint: public void myPrint(int n)
{
If (n < 10)
{
System.out.print(n) ;
}
Else
{
Int m = n % 10;
System.out.print(m) ;
MyPrint(n / 10) ;
}
}
What is printed for the call myPrint(8) ?


A) 10
B) 8
C) 4
D) 21

Correct Answer:

verifed

Verified

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

Related Questions