Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

random

 
nil lin
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How to send out card(arbitrarily)??
Can I use "random"?and how to use it?
thanks a lot!
 
Ananth Ram
Ranch Hand
Posts: 99
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You could do that with the help of Math.random()......
 
Dirk Schreckmann
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic