Can any one help me in generating random number sequence for real time application.
with following constraint, the routine should not access the current time stamp or db time stamp.
I have tried with util.Random and math.random() they are not generated unique random numbers, after a period of time , say after every 100 or 150 numbers , they are generating again same set of numbers.
The difficulty is in the fact that you want unique numbers.
You could do this by first making a list of all possible numbers, and then call Collections.shuffle(...) on the list to put them in random order. Then you just iterate the list to get random numbers. This solution might not be practical if the range of all possible numbers is large, or when you need a lot of random numbers.