Java Random Number generateRandomNumericString(int maxLength)

Here you can find the source of generateRandomNumericString(int maxLength)

Description

generate Random Numeric String

License

Open Source License

Declaration

public static String generateRandomNumericString(int maxLength) 

Method Source Code


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

import java.util.Random;

public class Main {
    public static String generateRandomNumericString(int maxLength) {
        Random random = new Random();
        Long number = new Long((Math.round(Math.random() * maxLength)));
        return number.toString();
    }/*from ww w .  ja  v  a 2s  . c  o  m*/
}

Related

  1. generateRandomNumber(int length)
  2. generateRandomNumber(int min, int max)
  3. generateRandomNumber(int min, int max)
  4. generateRandomNumber(int start, int end)
  5. generateRandomNumberBetween(final int low, final int high)
  6. generateSaltNumber()
  7. genRandomNum(int pwd_len)
  8. genRandomNumber()
  9. genRandomNumber(int begin, int end)