Java tutorial
//package com.java2s; public class Main { public static String generateReplyID() { long l = System.currentTimeMillis(); return "RP" + String.valueOf(l) + String.valueOf((int) (1000.0D + Math.random() * 9000.0D)); } }