aspose file tools*
The moose likes Beginning Java and the fly likes random Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "random" Watch "random" New topic
Author

random

nil lin
Greenhorn

Joined: May 04, 2004
Posts: 4
How to send out card(arbitrarily)??
Can I use "random"?and how to use it?
thanks a lot!
Ananth Ram
Ranch Hand

Joined: Jan 18, 2001
Posts: 99
You could do that with the help of Math.random()......
Dirk Schreckmann
Sheriff

Joined: Dec 10, 2001
Posts: 7023
Take a look at the J2SE API documentation. Note that to generate a random number, you could make use of Math.random(), as suggested, or the class Random.

Are you able to figure out how to generate the random numbers you want after looking at the documentation of these two classes? If you're having trouble, just ask for more assistance, and be sure to post any code that you're working on.


[How To Ask Good Questions] [JavaRanch FAQ Wiki] [JavaRanch Radio]
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: random