Java Random Int randomNum(int number)

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

Description

random Num

License

Apache License

Declaration

private static String randomNum(int number) 

Method Source Code

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

public class Main {
    private static String randomNum(int number) {
        StringBuffer result = new StringBuffer();

        for (int i = 0; i < number; i++) {
            int random = (int) (Math.random() * 10);
            result.append(random);//w  w w .jav  a 2  s  .c o m
        }

        return result.toString();
    }
}

Related

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