G
Q. What will be the output of the following Java program? class recursion { int fact(int n) { int result; if (n == 1) return 1; result = fact(n - 1) * n; return result; } } class Output { public static void main(String args[]) { recursion obj = new recursion() ; System.out.print(obj.fact(5)); } }
No solution found for this question.
Add Solution and get +2 points.
You must be Logged in to update hint/solution
Be the first to start discuss.
Q. In the Java statement import java.lang.Math; Math is
Q. Which one of the following is false
Q. Which of these operators can skip evaluating right hand operand?
Q. _jspService() method of HttpJspPage class should not be overridden.
Q. Which of these methods are used to register a mouse motion listener?
Q. Which exception is thrown by read() method?
Discusssion
Login to discuss.