Java Random RandomCode()

Here you can find the source of RandomCode()

Description

Random Code

License

Open Source License

Declaration

public static String RandomCode() 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {

    public static String RandomCode() {
        StringBuffer str = new StringBuffer();
        str.append((int) (Math.random() * 9 + 1));
        for (int i = 0; i < 5; i++) {
            str.append((int) (Math.random() * 10));
        }//  w ww  . j  av  a  2 s  . co m
        return str.toString();
    }
}

Related

  1. randomAgain()
  2. randomAlpha()
  3. randomAlternate(char c)
  4. randomCharacterVector(int size)
  5. randomCode()
  6. randomCSeq()
  7. randomData(Random random, int length)
  8. randomDigit()
  9. randomDoubleArray(int size)