And what if you do the same thing in java having almost built in fuctions for random numbers picking where you just put your priority e.g
Random().nextInt(int bound) generates a random integer from 0 (inclusive) to bound (exclusive)
If you give the function
private static int getRandomNumberInRange(int min, int max)
private static int getRandomNumberInRange(0, 6) it will generate random numbers between 0 and 6
Getting the random number within a range is not the problem, that is basically what rand(min,max) does.
My problem is to get a number whit a certain chance ;)
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
so you can set priorities in java with the help of threading
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit