I want to generate the random number like that
ADF1845CFT
ADF1864ATY
ADF18AT65Y
Note: There I FIX the ADF18 I want only take the next 5 digit with number and charter
I am successfully create the 5 digit with number
There is Various solution I am using
How to make combined random number matrix
Java random number with given length
etc. method
With these method I am create successful random 5 digit numbers.
Any Help Appreciate....
you can use random UUIDs...
final String randomCode = UUID.randomUUID().toString();
// or you can play with the len...
final String randomCode2 = UUID.randomUUID().toString().substring(0, 5);
You can use apache commons-lang RandomStringUtils.randomAlphanumberic:
"ADF18" + RandomStringUtils.randomAlphanumberic(5);
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