File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "How to create random numbers" Watch "How to create random numbers" New topic

How to create random numbers

Gobinath Manoj

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

Joined: Mar 22, 2005
Posts: 42965
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.
I agree. Here's the link:
subject: How to create random numbers
jQuery in Action, 3rd edition