public class OrderIDGenerator {
private String orderID;
static private int no=1;
public synchronized String getOrderID() {
SimpleDateFormat sDateFormat = new SimpleDateFormat("yyyyMMdd");
orderID = sDateFormat.format(new java.util.Date());
String strNum=String.format("%06d", no);
System.out.println(orderID+strNum);
no++;
return orderID;
}