Here you can find the source of getRandomChar()
private static String getRandomChar()
//package com.java2s; //License from project: Apache License import java.util.Random; public class Main { private static String[] chars = new String[] { "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9" }; private static String getRandomChar() { Random i = new Random(); return chars[i.nextInt(chars.length)]; }/*from www . j av a2 s . c o m*/ }