1public static String getRandomNumberString() {
2 // It will generate 6 digit random Number.
3 // from 0 to 999999
4 Random rnd = new Random();
5 int number = rnd.nextInt(999999);
6
7 // this will convert any number sequence into 6 character.
8 return String.format("%06d", number);
9}