Here you can find the source of getSerialNum()
private static String getSerialNum()
//package com.java2s; import java.util.concurrent.atomic.AtomicInteger; public class Main { private static AtomicInteger genrator = new AtomicInteger(); private static String getSerialNum() { int num = genrator.getAndIncrement(); num = Math.abs(num % 100); return String.format("%02d", num); }/* w ww .j ava 2 s .c o m*/ }