If i were to do that( in integer),
Since the maximum positive integer in java is (2 power 31)-1,
i may use a next random number of 9 power 15,
int val = new Random().nextInt(9 power 15);
filter all those value less than 1 power 15 except the greater values.....(to have a 16 digit value)
store in a temp variable,
Same procedure again, store in another variable,
Convert the two integer values into String, then use the concat method....(I should show first the output to insure that my algorithm is right)
In Long, you can use directly the nextLong(Long val) to generate values.... by filtering the generated value except the requirement,
You can now have your 32 digit random digit number....