Java AtomicInteger getSerialNum()

Here you can find the source of getSerialNum()

Description

get Serial Num

License

Open Source License

Declaration

private static String getSerialNum() 

Method Source Code

//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*/
}

Related

  1. getPrefixedTerm(String namespace, String localName)
  2. getQueryCounters()
  3. getRandom()
  4. getRandomTenantId()
  5. getReply()
  6. getTempFileName()
  7. getThreadDumpId()
  8. getThreadName(String pattern, String name)
  9. getTimeBasedUUID()