Java Random Int randomNum(int n)

Here you can find the source of randomNum(int n)

Description

random Num

License

Apache License

Declaration

public static int randomNum(int n) 

Method Source Code

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

public class Main {

    public static int randomNum(int n) {
        return (int) (Math.random() * Math.pow(10, n));
    }/*w w w .  j a v  a 2  s .c o m*/
}

Related

  1. randomIntRange(int low, int high)
  2. randomIntWithDigits(int digits)
  3. randomKey(int sLen)
  4. randomMatrix(int x, int y)
  5. randomModuleName(int count)
  6. randomNum(int number)
  7. randomNumber(int lower, int upper)
  8. randomNumber(int lower_bound, int higher_bound)
  9. randomNumber(int min, int max)