mardi 21 janvier 2020

Creating unique Ids based on different parameters in Java [closed]

I need to create different unique Ids at different times in the run of my application . These Ids would look something like currentdatetime say in YYYYmmddddhhss + six digit random number + hour of the day in HH + last digit of the year + six digit alphanumeric number in no particular order. And this is just one example of that ,ideally the method caller should be able to say I need a unique id with datetime in particular format + x no of digits + y number of aplhanumeric characters + z number of digits.

So, the method or generator should be able to accept arguments in a way that it is able to generate these ids depending upon what is being asked from the user .




Aucun commentaire:

Enregistrer un commentaire