0
How is java.util.Random used and it's importances
Random
3 odpowiedzi
+ 4
Jayakrishna🇮🇳 Thank you for trying to help, but all threads you linked refer to Math.random, not the Random class of the util package.
Math.random uses the Random class under the hood, but it's kind of less random than what the Random class returns, as some values are more likely to be returned than others.
Generally spoken, if you need more randomized values to rely on, use the Random class.
+ 2
They may help you..
https://www.google.com/amp/java.meritcampus.com/core-java-topics-amp/java-random-class-and-java-util-random-package
Edit:
https://www.educative.io/edpresso/how-to-generate-random-numbers-in-java
https://www.tutorialspoint.com/java/util/java_util_random.htm
https://www.google.com/amp/s/www.geeksforgeeks.org/java-util-random-class-java/amp/
&
From search bar.. Pls Use it next time..
It has examples used random class.
https://www.sololearn.com/Discuss/102733/?ref=app
https://www.sololearn.com/discuss/1638846/?ref=app
https://www.sololearn.com/discuss/1234492/?ref=app
+ 1
Tashi N mam, thanks for the point. Sorry for that. I usually check but this time, I didn't because the main link I posted will demonstrate random class along with others ways also... So I thought enough. But remaining posts added to tell use search bar.. And only one of them is not related, I deleted that but remain 3 has an examples of random class included.. So I leave it as it is.
Thanks for the feedback..
Edit:
Edited more.. I think OK now.... Is it?
Jayakrishna🇮🇳
No worries, you're fine. I just wanted to point out that we need to be careful when linking threads and make sure the question was answered in the mentioned threads.