All pastes #801003 Raw Edit

Unnamed

public text v1 · immutable
#801003 ·published 2007-11-28 22:16 UTC
rendered paste body
    public static String randomString(int len) {        String chars = "abcdefghijklmnopqrstuvwxyz0123456789";        String s = "";        for (int i = 0; i < len; i++)            s += chars.charAt((int) (Math.random() * chars.length()));        while (Character.isDigit(s.charAt(0)))            s = s.substring(1);        if (s.length() < 1 && len > 0)            return randomString(len);        return s;    }