Java examples for java.util:Random Int
get Random Long
//package com.java2s; public class Main { public static long getRandomLong() { return getRandomLong(1, Long.MAX_VALUE); }// w w w . jav a2s.c o m public static long getRandomLong(long min, long max) { return min + (long) ((Math.random() * (max - min))); } }