Here you can find the source of getRandomStr()
public static String getRandomStr()
//package com.java2s; //License from project: Open Source License import java.util.Random; public class Main { public static String getRandomStr() { StringBuilder sb = new StringBuilder(); sb.append(System.currentTimeMillis()); sb.append(new Random().nextInt(10000)); return sb.toString(); }//from w ww.ja v a2s . co m }