0

How is java.util.Random used and it's importances

Random

9th May 2020, 5:54 PM
Bakka Solomon Mwesigwa
Bakka Solomon Mwesigwa - avatar
3 Answers
+ 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.
9th May 2020, 6:46 PM
Tashi N
Tashi N - avatar
+ 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.
9th May 2020, 7:00 PM
Jayakrishna 🇼🇳