3 ms·
Simple java program to generate random numbers
- davelnewton 9y agoSo now you're just posting links to all your articles to... drive traffic? I mean, it's not even correct--it will print out random ints from 0-99, just like it says in the `int nextInt(int)` Javadocs. :(
- Alupis 9y agoNot to harp, but your set is better defined as [0, 100), that is, [0, 99], not the [1, 100] you mention in the article. nextInt(int): Returns a pseudorandom, uniformly distributed int value between 0 (inclusive) and the specified value (exclusive) https://docs.oracle.com/javase/7/docs/api/java/util/Random.html#nextInt(int) https://docs.oracle.com/javase/7/docs/api/java/util/Random.h...
- davelnewton 9y agoMore or less what I said, I think.
- davelnewton 9y agoHow did this get upvotes.
- frndslink 9y agodevel newton this program for example to understand the program how its work for beginners to programming world
- davelnewton 9y agoAfter corrections it's still wrong: as discussed, it will return 0-99.