Java AtomicInteger getRandom()

Here you can find the source of getRandom()

Description

get Random

License

Open Source License

Declaration

public static int getRandom() 

Method Source Code


//package com.java2s;
import java.util.concurrent.atomic.AtomicInteger;

public class Main {
    private static AtomicInteger serial = new AtomicInteger(0);

    public static int getRandom() {
        return serial.getAndIncrement();
    }/*from  w w  w  . j a  v a2s. co  m*/
}

Related

  1. getNextTempQueueName()
  2. getPortOffset()
  3. getPrefix(final String namespace, final Map namespacesPrefixesMap)
  4. getPrefixedTerm(String namespace, String localName)
  5. getQueryCounters()
  6. getRandomTenantId()
  7. getReply()
  8. getSerialNum()
  9. getTempFileName()