Er. Arjun saini Er. Arjun saini - 1 year ago 70
Android Question

How to create Random number with 5 digit combined of number and charter

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

etc. method

With these method I am create successful random 5 digit numbers.

Any Help Appreciate....

Answer Source

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);
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download