samedi 27 mars 2021

JAVA UUID use only numeric characters to generate random UUID

I want to generate a serial number for one of my classes like xxxxxxxxxx and I want its length to be exactly 10 characters.

how can I generate random UUID by only using "1234567890". is there something I have to pass to constructor or UUID.randomUUID()?

and how can I give it a fixed length?

thanks.




Aucun commentaire:

Enregistrer un commentaire