Here you can find the source of randomChar(char[] letters)
private static char randomChar(char[] letters)
//package com.java2s; //License from project: Open Source License import java.util.Random; public class Main { private static Random r = new Random(); private static char randomChar(char[] letters) { int index = r.nextInt(letters.length); return letters[index]; }//from w w w. j a v a2 s . c o m }