Java Random Int randomHexOfInt(int min, int max)

Here you can find the source of randomHexOfInt(int min, int max)

Description

random Hex Of Int

License

Apache License

Declaration

public static String randomHexOfInt(int min, int max) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

public class Main {
    public static String randomHexOfInt(int min, int max) {
        int randomInt = randomIntWithMinMax(min, max);
        return Integer.toHexString(randomInt);
    }/*ww  w . j ava2 s. c o  m*/

    public static String randomHexOfInt(int max) {
        int randomInt = randomIntWithMinMax(0, max);
        return Integer.toHexString(randomInt);
    }

    public static int randomIntWithMinMax(int min, int max) {
        return (int) (min + (Math.random() * (max - min + 1)));
    }
}

Related

  1. randomCommon(int min, int max, int n)
  2. randomCommonStr(int min, int max, int n)
  3. randomDoubleMatrix(int rows, int columns)
  4. randomFloatInInterval(float lower, float upper)
  5. randomHex(int length)
  6. randomInIntervall(float low, float high)
  7. randomInt(double arg)
  8. randomInt(final int max)
  9. randomInt(final int min, final int max)