not sure if "more" or "less" random really make much sense mathematically ...
but maybe you could try a switch - case block , and run different code for different cases for different output of the random method.. that way , you can easily write up an increasing number of cases and well.. make it feel more random...
"more random"? I don't know what that means.
If your code is intended to enter the if block half the time at random, just use if (ran.nextBoolean())
... which is as random as Sun's mathematicians know how to make it.
If your code is intended to enter the if block half the time at random, just use
actually, there's no guarantee it will be executed half the time, or anywhere near half the time. That's what random means :)
Over an indefinitely long number of executions most likely it will be roughly half the time, but over any finite number there's no such statement as can be made except that the more iterations, the more likely it is to approach 50%.
Hi I'm having a problem implementing a mini shopping cart drop down in the header to show the user all the products they have in their shopping cart. It seems the only solution for this is Ajax, and I've looked all over and can't find anything that I could possibly ...
Help! I want to create a java program that finds the highest even integer among the values entered by the user. Stop asking values when a value less than 1 have been entered. If no even integer is entered, display "No Even Integer"