I am having trouble ranging values with the Random.nextDouble() method. It doens't work like the nextInt() method so i'm a bit confused. I need values ranging from 1.00 to 1,000,000.00. The rnd in my code is the object i created from class Random(). This doesn't return the result i'm looking for. It keeps giving me some numbers bigger than 1 million. How do I keep the values within the range?
doubles[i] = 1.00+rnd.nextDouble()*(1000000.00-1.00);