Here you can find the source of randomChar()
private static char randomChar()
//package com.java2s; //License from project: Open Source License import java.util.Random; public class Main { private static final Random random = new Random(17); private static final String alphabet = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"; private static char randomChar() { return alphabet.charAt(random.nextInt(alphabet.length())); }//from w w w . j a v a2 s .c o m }