Here you can find the source of randomPseudo()
public static String randomPseudo()
//package com.java2s; //License from project: Open Source License public class Main { public static final String ALPHABET = "abcdefghijklmnopqrstuvwxyz"; public static final String VOWELS = "aeiouy"; public static final String CONSONANTS = "bcdfghjklmnpqrstvwxz"; public static String randomPseudo() { final int length = random(4, 8); StringBuilder sb = new StringBuilder(length); boolean flag = random(0, 1) == 1; for (int i = 0; i < length; ++i) { sb.append(flag ? random(VOWELS) : random(CONSONANTS)); flag = !flag;/* ww w .j a v a 2s .co m*/ } return sb.toString(); } private static int random(int min, int max) { return (int) (Math.random() * max + min); } public static char random(String str) { return str.charAt(random(0, str.length())); } public static String random(int length) { StringBuilder sb = new StringBuilder(length); for (int i = 0; i < length; ++i) sb.append(random(ALPHABET)); return sb.toString(); } }