Question: public static int mystery ( int n ) { Random r = new Random ( ) ; int a = r . nextInt ( 3
public static int mysteryint n
Random r new Random;
int a rnextInt;
int b ;
Point A
while n b
Point B
b b a;
if a
n;
Point C
a rnextIntb;
else
a b ;
Point D
Point E
return n;
Categorize each assertion at each point with ALWAYS, NEVER, or SOMETIMES:
n b
a
b a
Point A
Point B
Point C
Point D
Point E
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
