Java Random Number generateRandomNum(int i)

Here you can find the source of generateRandomNum(int i)

Description

generate Random Num

License

Open Source License

Declaration

public static StringBuffer generateRandomNum(int i) 

Method Source Code

//package com.java2s;

import java.util.Random;

public class Main {

    public static StringBuffer generateRandomNum(int i) {
        Random random = new Random();
        StringBuffer num = new StringBuffer();
        for (int j = 0; j < i; j++) {
            int numChild = random.nextInt(10);
            num.append(numChild);//from   w  w  w . jav  a2s  . com

        }
        return num;
    }
}

Related

  1. createRandomFilename()
  2. createRandomHexNumber(int length)
  3. createRandomNumber()
  4. createRandomNumber(int index)
  5. distinctInts(int from, int to, int number)
  6. generateRandomNum(int passNumber)
  7. generateRandomNumb(int randomSize, int range)
  8. generateRandomNumber()
  9. generateRandomnumber(int firstNum, int restNum)