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 generateRandomStrs(int strCount) {
        StringBuilder randomStrs = new StringBuilder();
        Random randomGenerator = new Random();
        for (int i = 1; i < strCount; i++) {
            int randomInt = randomGenerator.nextInt(26);
            randomStrs.append((char) (randomInt + 'a'));
        }

        return randomStrs.toString();
    }
}