Class IntRandomNumberGenerator


  • public final class IntRandomNumberGenerator
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      IntRandomNumberGenerator​(int min, int max)
      Initialize a new random number generator that generates random numbers in the range [min, max]
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int nextInt()
      Returns a random number in the range (min, max)
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • IntRandomNumberGenerator

        public IntRandomNumberGenerator​(int min,
                                        int max)
        Initialize a new random number generator that generates random numbers in the range [min, max]
        Parameters:
        min - - the min value (inclusive)
        max - - the max value (inclusive)
    • Method Detail

      • nextInt

        public int nextInt()
        Returns a random number in the range (min, max)
        Returns:
        a random number in the range (min, max)