Java tutorial
//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(); } }