Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

ramdom class

 
AJ sisodia
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How and when to use Random class.
 
Mani Ram
Ranch Hand
Posts: 1140
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When to use: Whenever you need something in random. If you need a random number, use the Random API. If you need a random String, use the Random API & build the String based on the output.

How to use: Check the API of java.util.Random class
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic