Campbell Ritchie wrote: I think you would call those numbers something like random selection from a declining population.
There are worse crimes than burning books. One of them is not reading them. Ray Bradbury
What a lovely name!Robert D. Smith wrote: . . .
I simply refer to it as the non-random random number generator.
Thank you. It is (I hope) just a commonplace example of how you can use Streams to make coding easier to read. If you get a Java8 book, it will tell you that is moving from an imperative to a declarative style, where you tell the JVM what you want to do rather than how to do it. Compare that will using a loopIsn't that crystal‑clear! Particularly lines 8 and 10. Aren't they really easy to understand? And having 11 lines as against the earlier example's
By the way, that MyRandom code was really slick. . . .
Robert D. Smith wrote:
Campbell Ritchie wrote: I think you would call those numbers something like random selection from a declining population.
I simply refer to it as the non-random random number generator.
There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors
There are three kinds of actuaries: those who can count, and those who can't.
Would anybody like some fudge? I made it an hour ago. And it goes well with a tiny ad ...
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
|