This week's book giveaway is in the OCAJP 8 forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes ramdom class Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "ramdom class" Watch "ramdom class" New topic

ramdom class

AJ sisodia

Joined: Jan 19, 2005
Posts: 16
How and when to use Random class.
Mani Ram
Ranch Hand

Joined: Mar 11, 2002
Posts: 1140
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

Quaerendo Invenietis
I agree. Here's the link:
subject: ramdom class
It's not a secret anymore!