Here is the code to generate random unique alpha-numeric ids. The seed is must which is used to generate the unique Ids. Based on the requirement you can also include special characters (*,&,$..etc ) in the seed , which are helpful in generating random passwords.
The generated code length can be increased by making the for loop to loop the specified no of times by assigning desired value to length variable.
The Thread.sleep() method used in the function can be removed if the usage of code is in website. If you are using this code of standalone application then this method is must depending upon the processor speed. You can try commenting out this line of code to see what difference it makes when using in standalone application. It shows how the execution of method depends on the processor speed.
