Here you can find the source of generateRandomNumericString(int maxLength)
public static String generateRandomNumericString(int maxLength)
//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*/ }