Here you can find the source of generateUniqueID()
public static String generateUniqueID()
//package com.java2s; import java.text.DateFormat; import java.text.SimpleDateFormat; import java.util.Date; public class Main { public static String generateUniqueID() { DateFormat dateFormat = new SimpleDateFormat("ddMMyyHHmmss"); Date date = new Date(); return dateFormat.format(date); }//from w w w . j av a 2s . c om }