forum

Home / DeveloperSection / Forums / How to generate a random alpha-numeric string?

How to generate a random alpha-numeric string?

Samuel Fernandes214213-May-2015
I've been looking for a simple Java algorithm to generate a pseudo-random alpha-numeric string. In my situation it would be used as a unique session/key identifier that would "likely" be unique over 500K+ generation (my needs don't really require anything much more sophisticated). Ideally, I would be able to specify a length depending on my uniqueness needs. For example, a generated string of length 12 might look something like "AEYGF7K0DM1X".

Updated on 14-May-2015

Can you answer this question?


Answer

1 Answers

Liked By