Write a recursive method that returns the factorial of an integer.
What will be an ideal response?
```
public int factorial(int n)
{
if(n == 0)
return 1;
else
return n*factorial(n-1);
}
```
You might also like to view...
PGP is a widely distributed encryption program.
a. True b. False
The location that allows you to adjust mouse settings and optimize your visual display is known as the:
A) Ease of Access Center B) programs list C) notification area D) status area
What Windows feature does Gedit utilize to store or retrieve text?
command line clipboard copy paste file explorer
Case-Based Critical Thinking Questions ? Case 13-1 ? Kenneth wants to create a custom object for a specific programming task. He has defined the custom object by creating it as an object literal. Kenneth can also use a(n) _____ to define the custom object.
A. base object B. for…inloop C. prototype chain D. object constructor