Question: Reference: [link text](http://download.oracle.com/javase/1.4.2/docs/api/java/util/Random.html)

i cannot understand the following line , can anybody provide me some example for the below statement?

If two instances of Random are created with the same seed, and the same sequence of method calls is made for each, they will generate and return identical sequences of numbers

Answer: 
The numbers are not really random, given the same starting conditions (the seed) and the same sequence of operations, the same sequence of numbers will be generated. This is why it would not be a good iea to use the basic Random class as part of any cryptograhic or security related code since it may be possible for an attacker to figure out which sequnce is being generated and predict future numbers.

For a random number generator that emits non-deterministic values, take a look at [SecureRandom](http://download.oracle.com/javase/1.4.2/docs/api/java/security/SecureRandom.html).

See [Random number generation, Computational methods](http://en.wikipedia.org/wiki/Random_number_generation#Computational_methods) on wikipedia for more info.
This means that when you create the Random object (e.g. at the start of your program), you will probably want to start with a new seed. Mostly people choose some time related value, such as the number of ticks.

The fact that the number sequences are the same given the same seed is actually very convenient if you want to debug your program: make sure you log the seed value and if something is wrong you can restart the program in the debugger using that same seed value. This means you can replay the scenario exactly. This would be impossible if you would (could) use a true random number generator.