I don't think this is really the right place to ask or answer a question
like this but you will want to use the java.util.Random class and
declare an int in you method or class. Then call the nextInt() method
of the random class and you should be off and running.

Mo DeJong
dejong at cs.umn.edu

On Wed, 6 Jan 1999, G. Sagar wrote:

> Hi,
> 
> Im very new to java programming (in fact programming).
> 
> I want to initialize a variable and want a random number between 1-100 to be
> stored in the variable. What is the syntax for this ???
> 
> Please help.
> 
> TIA.
> 
> Cheerio,
> 
> Sagar.
> 
> 

Reply via email to