J
Jacob
As an aid for unit testing I want to write a method
that generate a random string of a specified length:
String getRandom(int length)
{
// magic
}
My current approach is to generate n random bytes
and then convert them to a string using the String
ctor.
This *do* produce a string, but there are comments in
the String docs that worries me.
Is there more to this?
Thanks!
that generate a random string of a specified length:
String getRandom(int length)
{
// magic
}
My current approach is to generate n random bytes
and then convert them to a string using the String
ctor.
This *do* produce a string, but there are comments in
the String docs that worries me.
Is there more to this?
Thanks!