Question: In java people can put randomized number:

```
import java.util.Random;

```

I'm developing a game and its essential for the randomizers in my game. But it changes numbers to fast for me and I really liked a time for it to change to a new randomized number. How do I do that? I tried to search on google but gave me nothing.

Answer: 
Google gave you nothing? I highly doubt that.

```
public class Game {
    private Random random = new Random(System.currentTimeMillis());

    // Generate all the random numbers you need.
}

```

If you need them on a schedule, use a `Timer` to only call for the next number when the alarm goes off.
The methods that you call on a `Random` object return a new random number each time you call them. If that's not what you want, then write your own class that holds an instance of `Random`, and that checks when the last time was you've called it to get a new random number. If it's time for a new one, return a new one. Something like this:

```
class TimedRandom {
    private final Random random = new Random();

    private int lastNumber;
    private long lastRefreshTime;

    public int getNumber() {
        long now = System.currentTimeMillis();

        // If it's more than 2 seconds ago, generate a new random number
        if (now - lastRefreshTime > 2000L) {
            lastNumber = random.nextInt();
        }

        lastRefreshTime = now;
        return lastNumber;
    }
}

```