Question: Regarding the JAVA language consider these questions: An infinte loop and an infinate recursion is A both continue to repeat indefinitely B both will be
Regarding the JAVA language consider these questions:
An infinte loop and an infinate recursion is
A both continue to repeat indefinitely
B both will be caught by the Java Virtual Machine during execution
C are different because it is impossible to detect the latter, while its quite easy to detect the former
D both will be caught by the compiler
Recursion is often less efficient than iteration because:
A recursive methods take longer to program
B it can cause an explosion of method calls
C recursive method are harder to debug
D it is not as intutitive
Recursion is sometimes preferable to iteration because:
A it is faster.
B it requires less memory.
C it models the problem more logically.
D All of the above.
True of false:
It always is possible to replace a recursion by an iteration.
It always is possible to replace an iteration by a recursion.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
