Here you can find the source of randLong(long minimum, long maximum)
public static Long randLong(long minimum, long maximum)
//package com.java2s; //License from project: Open Source License import java.util.Random; public class Main { private static final Random seed = new Random(); public static Long randLong(long minimum, long maximum) { assert minimum <= maximum; long value = Math.abs(seed.nextLong()) % (maximum - minimum + 1) + minimum; assert minimum <= value && value <= maximum; return value; }//from w w w. j a v a 2 s . c om }