Question: Consider the following code: Random rand = new Random(); int a = rand.nextInt(100); int b = rand.nextInt(20) + 50; int c = rand.nextInt(20 + 50);
Consider the following code:
Random rand = new Random();
int a = rand.nextInt(100);
int b = rand.nextInt(20) + 50;
int c = rand.nextInt(20 + 50);
int d = rand.nextInt(100) – 20;
int e = rand.nextInt(10) * 4;
What range of values can each variable (a , b , c , d , and e) have?
Step by Step Solution
3.38 Rating (151 Votes )
There are 3 Steps involved in it
Range of random values generated ... View full answer
Get step-by-step solutions from verified subject matter experts
