Java
UNIT 4 CHALLENGES
UNIT 4 CHALLENGE 1
You
will create the class called MyUtil. If you prefer, you can use a shorter name
such as Utils or even UT. It
will be used to simply store different functions that are useful for other
programs. PART A – RANDOM NUMBERS Create the following functions: public
static int random1(int
high) Returns a random number between 1
and high inclusively. public
static int random0(int
high) Returns a random number between 0
and high inclusively. public
static int random(int
low, int high) Returns a random number between
low and high inclusively.
|