Exam 14: Recursion
Exam 1: Introduction to Computers and Java40 Questions
Exam 2: Java Fundamentals40 Questions
Exam 3: A First Look at Classes and Objects40 Questions
Exam 4: Decision Structures42 Questions
Exam 5: Loops and Files40 Questions
Exam 6: A Second Look at Classes and Objects40 Questions
Exam 7: Arrays and the Arraylist Class40 Questions
Exam 8: Text Processing and Wrapper Classes40 Questions
Exam 9: Inheritance40 Questions
Exam 10: Exceptions and Advanced File Io40 Questions
Exam 11: Java-Fx: Gui Programming and Basic Controls40 Questions
Exam 12: Java-Fx: Advanced Controls40 Questions
Exam 13: Java-Fx: Graphics, Effects, and Media40 Questions
Exam 14: Recursion24 Questions
Exam 15: Databases40 Questions
Select questions type
Given the following code that uses recursion to find the factorial of a number, how many times will the else clause be executed if n = 5?
private static int factorial(int n)
{
If (n == 0)
Return 1;
Else
Return n * factorial(n - 1);
}
(Multiple Choice)
4.8/5
(88)
Whereas a recursive algorithm might result in faster execution time, the programmer might be able to design an iterative algorithm faster.
(True/False)
4.8/5
(86)
The actions performed by the JVM that take place with each method call are sometimes referred to as
(Multiple Choice)
4.7/5
(76)
The recursive binary search algorithm is a good example of repeatedly breaking a problem down into smaller pieces until it is solved.
(True/False)
4.9/5
(84)
Showing 21 - 24 of 24
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)