The Random class of java.util package contains methods in handling Random numbers as the class name implies. An instance of this class is used to generate a stream of pseudorandom numbers. A 48-bit seed has been used on this class, and these seed is modified using a linear congruential formula.
A particular scenario wherein if two instances of Random class are created using the same value on it’s seed, and the same sequence of method calls is made for each, they will generate and return identical sequences of numbers. This is a must have property of this class and in order to guarantee as such, particular algorithms are specified for Random class. Java implementations must use all the algorithms shown here for the class Random, for the sake of absolute portability of Java code. However, subclasses of class Random are permitted to use other algorithms, so long as they adhere to the general contracts for all the methods.