Here you can find the source of randomLong(long x, long y)
public static long randomLong(long x, long y)
//package com.java2s; //License from project: Open Source License public class Main { public static long randomLong(long x, long y) { return x + ((long) (Math.random() * (y - x))); }/*from w w w .j a v a2s . c o m*/ }