Using java I want to generate some random values in one program and then use these values in some other program everytime the 2nd program is executed.
Purpose of this is to generate random values once and then hold and keep them constant for every run of the program later. Is it possible in some way? Thanks
When you exit a program, anything you don’t store in a file is lost.
I suspect you don’t need to worry about IO as much as you think. You should be able to read millions of values in a few milli-seconds. In fact you should be able to generate millions of random numbers in a fraction of a second.
prints
Generating and writing
prints
Reading the same file.
prints
Reading the same file repeatedly
prints