Solved

Consider the Recursive Method MyPrint in This Code Snippet: Public

Question 106

Multiple Choice

Consider the recursive method myPrint in this code snippet: 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(821) ?


A) 821
B) 128
C) 12
D) 10

Correct Answer:

verifed

Verified

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

Related Questions