Java Random Int random(int length, String data)

Here you can find the source of random(int length, String data)

Description

random

License

Apache License

Declaration

private static String random(int length, String data) 

Method Source Code

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

public class Main {
    private static String random(int length, String data) {
        String str = "";
        int len = data.length();
        while (length > 0) {
            length--;//  w ww  .j  ava 2  s .  c  o  m
            str += data.charAt((int) (Math.random() * len));
        }
        return str;
    }
}

Related

  1. randIntv(double fr, double to)
  2. randLocation(int min, int max)
  3. Random(int a, boolean Zero)
  4. random(int length)
  5. random(int length)
  6. random(int limit)
  7. random(int lo, int hi)
  8. Random(int low, int high)
  9. random(int lowerBound, int upperBound)