In the JDK doc of Random, they say "All 232 possible int values are produced with (approximately) equal probability". So I can generate any long number with approximately equal probability by generate the first 4 bytes with nextInt(), next 4 bytes with nextInt() then join them to create 8 bytes for a long.
Random r = new Random();
int firstPart = r.nextInt();
int secondPart = r.nextInt();
ByteBuffer bf = ByteBuffer.allocate(8);
bf.putInt(firstPart);
bf.putInt(secondPart);
long result = bf.getLong(0);
Is that true?