Java tutorial
//package com.java2s; import java.util.Random; public class Main { public static String getRandomString(int len) { String returnStr = ""; char[] ch = new char[len]; Random rd = new Random(); for (int i = 0; i < len; i++) { ch[i] = (char) (rd.nextInt(9) + 97); } returnStr = new String(ch); return returnStr; } }