Question: Write the following method that returns a random number between start and end, excluding the numbers. public static int getRandom(int start, int end, int... numbers)
Write the following method that returns a random number between start and end, excluding the numbers.
public static int getRandom(int start, int end, int... numbers)
For example, invoking getRandom(1,100,4,8,95,93) returns a random number between 1 and 100 excluding 4,8,95,and 93. Write a test program that invokes getRandom(1,100,4,8,95,93) 45 times and displays the resulting numbers 15 per line using the format %4d.
Step by Step Solution
3.37 Rating (163 Votes )
There are 3 Steps involved in it
public class Exercise0713 public static void mainString args for int i 1 i best b... View full answer
Get step-by-step solutions from verified subject matter experts
