Java tutorial
//package com.java2s; public class Main { public static String getRandomString(int len) { String str = (Long.toHexString(Double.doubleToLongBits(Math.random()))).substring(0, len); return str; } }