This week's book giveaway is in the JavaScript forum.
We're giving away four copies of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js and have Paul Jensen on-line!
See this thread for details.
Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Creating a Random Number..  RSS feed

 
Saniya Ansari
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi..
I'm wondering if someone can tell me how to generate a random number in Java.. i forgot how to do that..
Hope somebody replies soon..
 
pk kumar
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
Random numbers can be generated either by using Math.random() or by using the class java.util.Random.
Regards
pk
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!