Question: 5. Consider the following java method: boolean check (int n, int i) { if (n < 2) return (n == 2)? true : false;
5. Consider the following java method: boolean check (int n, int i) { if (n < 2) return (n == 2)? true : false; if (n % i == 0) return false; if (ii > n) return true; return check (n, i + 1); } a. Draw the method calling sequence if n = 11 and i = 2. b. What is the functionality of this method in general? Write your answer here Ln
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
