Java Random Long nextLongId()

Here you can find the source of nextLongId()

Description

next Long Id

License

Open Source License

Declaration

public static Long nextLongId() 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.util.Random;

public class Main {
    public static final Random RANDOM = new Random();

    public static Long nextLongId() {
        return RANDOM.nextLong() + 1;
    }/*from   w w w.  j av  a  2 s  .  c o m*/

    public static Long nextLong() {
        return RANDOM.nextLong();
    }
}

Related

  1. nextLong(long n)
  2. nextLong(long RangeBottom, long rangeTop)
  3. nextLong(Random random, final long lower, final long upper)
  4. nextLong(Random rng, long n)
  5. nextLong(Random rng, long n)
  6. randLong()
  7. randLong(long minimum, long maximum)
  8. randLong(long n)
  9. random(long begin, long end)