static Random r = new Random();
static String ssource = " abcdefghijklmnopqrstuvwxyz " + " 0123456789 " ;
static char [] src = ssource.toCharArray();
private int codeLength = 4 ;
private String getCode( int length)
{
char[] buf = new char[length];
int rnd;
for (int i = 0; i < length; i++)
{
rnd = Math.abs(r.nextInt()) % src.length;
buf[i] = src[rnd];
System.out.println(rnd);
}
return new String(buf);
}