This Function will give random string every time
public boolean fncGenerateRandString(Keyword objKeyword){java.util.Random r = new java.util.Random();int i = 1, n = 0;char c;String str="Z";for (int t = 0; t < 3; t++) {while (true) {i = r.nextInt(10);if (i > 5 && i < 10) {if (i == 9) {i = 90;n = 90;break;}if (i != 90) {n = i * 10 + r.nextInt(10);while (n < 65) {n = i * 10 + r.nextInt(10);}}break;}}c=(char)n;str= str + String.valueOf(c);}while(true){i = r.nextInt(10000000);if(i>999999)break;}str=str+i;System.out.println( str);
Enjoy!