Random Function

Understand overloaded methods that generate random numbers of different types.

We'll cover the following

Problem

Write a program that provides two overloaded random( ) functions. The first one generates an integer random number, whereas the second generates a random number that lies within the range passed to the random( ) function.

Coding solution

Here is a solution to the problem above.

Get hands-on with 1400+ tech skills courses.