Java Random getRandom(int i)

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

Description

get Random

License

Apache License

Declaration

public static String getRandom(int i) 

Method Source Code

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

import java.util.*;

public class Main {

    public static String getRandom(int i) {
        Random jjj = new Random();
        if (i == 0)
            return "";
        String jj = "";
        for (int k = 0; k < i; k++) {
            jj = jj + jjj.nextInt(9);// w ww  .ja v a 2s.  co  m
        }
        return jj;
    }
}

Related

  1. getPoisson(double lambda, Random rng)
  2. getRandom()
  3. getRandom()
  4. getRandom()
  5. getRandom(Collection collection)
  6. getRandom(int min, int max)
  7. getRandomDigits(Random r, int l, int radix)
  8. getRandomElement(T[] items)
  9. getRandomFileName()