Click to See Complete Forum and Search --> : How to Generate a random string, please help


February 22nd, 2000, 12:27 AM
Hi, I need a random string, I want every user when saving data, the name of the
file is like this: resultXXXX.txt, I need to concatenate XXXX to "result" and "txt",
Regards

SkyM
February 23rd, 2000, 03:45 AM
java.util.Random rnd = new Random( 12345 );
String szRand = new Integer( rnd.nextInt() ).toString();
String szFileName = "result" + szRand + ".txt";




SY, SkyM