thank u and to vikramjit.
will get bk.
regds,
-anoop
-----Original Message-----
From: Mike De Bruyn [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, June 26, 2002 2:34 PM
To: [EMAIL PROTECTED]
Subject: Re: Random string
This is something I wrote,
it should do the trick...
# BEGIN FILE RndStringGen.java
public final class RndStringGen {
private String rndstring;
public static void main (String [] args) {
// Create Object, call getPasswd and pring the password
// Call getPasswd with as argument the number of chars // you want
in password
System.out.println(new RndStringGen().getPasswd(8));
} //
public String getPasswd(int length) {
StringBuffer strbuf = new StringBuffer(length);
for (int counter=0; counter<length; counter++) {
int i = (int) (1230 / 9 * Math.random());
/* Check for Bounderies to have nice characters
above 50, less then 123, and excluding a list of 'annoying characters.
*/
