lundi 22 février 2021

How many codes can RandomStringGenerator generate for a length of 6?

I am using this code to generate random codes of length 6

RandomStringGenerator generator = new RandomStringGenerator.Builder()
                 .withinRange('0', 'z')
                 .filteredBy(CharacterPredicates.LETTERS, CharacterPredicates.DIGITS)
                 .build();
             String randomLetters = generator.generate(6);

RandomStringGenerator is from apache commons commons-text. I would like to understand how many codes can be generated with this code? 100K codes? 1 Million codes? How can I calculate that?




Aucun commentaire:

Enregistrer un commentaire