Comments below.
>From: Poornima Visvesvaran <[EMAIL PROTECTED]>
>Reply-To: "A mailing list for discussion about Sun Microsystem's Java
> Servlet API Technology." <[EMAIL PROTECTED]>
>To: [EMAIL PROTECTED]
>Subject: Random class - out of topic
>Date: Sat, 7 Apr 2001 03:27:25 -0700
>
>Hi friends,
>
>I want to generate int random numbers between 0 to 25.
>
>Random r= new Random();
>int i=r.nextInt(25);
>
>
>now i should have values from 0 to 25 whenever we run
>the process.
>
>Compilation is fine. At runtime, it is displaying as
>there is no such method.
>
>All the other methods of random class
>(ie.nextInt(),nextDouble() etc) are working
>perfectly.)
>
>Can anyone help me.
I would suggest instead to use Math.random() which actually uses Random
class internally so we are saved from using getInt or getDouble etc etc.
then cast it to the particular type.
Hope this helps.
Bye,
Jiger
>
>With regards,
>
>Poornima Visvesvaran.
>
>__________________________________________________
>Do You Yahoo!?
>Get email at your own domain with Yahoo! Mail.
>http://personal.mail.yahoo.com/
>
>___________________________________________________________________________
>To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
>of the message "signoff SERVLET-INTEREST".
>
>Archives: http://archives.java.sun.com/archives/servlet-interest.html
>Resources: http://java.sun.com/products/servlet/external-resources.html
>LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html