This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes How to create random numbers Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "How to create random numbers" Watch "How to create random numbers" New topic
Author

How to create random numbers

Gobinath Manoj
Greenhorn

Joined: Oct 17, 2007
Posts: 11
Hi Friends

How to create 6 digit random number in jsp. And i need that number
converted into gif format. If you have any idea send me. This is very important in my project.


Thanks Regards <br />Gobinath.L
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41178
    
  45
You can use the java.util.Random class to generate random numbers. Its nextInt(int) method returns an integer between 0 and the specified upper bound.

This blog entry talks about how to generate an image containing a specified text.


Ping & DNS - my free Android networking tools app
 
jQuery in Action, 2nd edition
 
subject: How to create random numbers
 
Similar Threads
Creating random Unique values
random number
Arrays
random number question
Random number