Question: ( V ) Consider following code that computes the factorial of a number? static int factorial ( int n ) { if ) = (
V Consider following code that computes the factorial of a number?
static int factorialint
if
return ;
else
return ;
Explain what would be the result of
Rewrite the code with Assertion or Exception handling mechanism to protect it from a stupid behavior.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
