Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Creating a Random Number..

 
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