Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
import java.util.Random;

public class Main {
    public static String randomNumericString(int stringLength) {
        Random generator = new Random();
        StringBuilder randomStringBuilder = new StringBuilder();
        for (int i = 0; i < stringLength; i++) {
            randomStringBuilder.append(generator.nextInt(9));
        }
        return randomStringBuilder.toString();
    }
}