vendredi 22 mai 2020

Is there any library in java from where i can retrieve Unique number according to given range whenever i call except Random and Math.random? [closed]

I have number 4 as an argument

i need to do loop from 1 to 100 every time i need to received unique number with given digits defined in argument

e.g

1111 (Correct) 2222 (Correct) 333 (Wrong because the digits should be 4) 3333 (Correct) 1111 (Wrong because it duplicate)

So Is there any way to avoid above wrong output?




Aucun commentaire:

Enregistrer un commentaire