Question: What is the output of running Function2.java: 1 2 public class Function2 { int func(int n) 30 455709 { int oldest -0; int previous

What is the output of running Function2.java: 1 2 public class Function2 { int func(int n) 30 455709 { int oldest -0; int previous -1; int answer =n; if (n = 2) for (int i=2; i
Step by Step Solution
There are 3 Steps involved in it
The given Java code defines a class Function2 with a method func that calculates the nth Fibonac... View full answer
Get step-by-step solutions from verified subject matter experts
