Possible Duplicate:
Java random number with given length
I have been trying to generate a 15 digit long number in java but it seems I have failed to do it so far as using:
This is producing a maximum of 10 digits.
Random random = new Random();
int rand15Digt = random.nextInt(15);
How can I generate it successfully?
Use Random's method public long nextLong()
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With