Java tutorial
//package com.java2s; //License from project: Apache License import java.util.Random; public class Main { public static long getRandomLong4() { Random rd = new Random(); long l2 = 0; for (int i = 1; i < 100; i++) { long l1 = (int) (Math.random() * 9000 + 1000); l2 = rd.nextInt(9000) + 1000; } return l2; } }