Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Random Number problem

Re: Random Number problem

From: C. <c_ferguson_at_rationalconcepts.com>
Date: Sat, 26 Jun 1999 12:23:23 -0700
Message-ID: <377528A6.4C8DB3E0@rationalconcepts.com>


Try using the java.util.Random class to generate your random number. Can't say for sure if this will fix your problem...I'm not familiar with OAS.
Best of luck,
Cindy

seiferta_at_my-deja.com wrote:

> I wrote a Java-Application that runs wiht the OAS
> (Oracle Application Server 4.0). I'm trying to
> generate a random number with this application but
> this happens one the first time when I start the
> App. The second time the generation fails or
> produces the number 0.
>
> Here is the java code producing the number
>
> int max=9999999999;
>
> String randomNumber =
> Double.toString((int)(Math.round(Math.random()))*m
> ax);
>
> What's wrong with this snippet. Is this an OAS
> cache problem ?
>
> Any ideas are appreciated.
>
> Andre'
>
> Sent via Deja.com http://www.deja.com/
> Share what you know. Learn what you don't.
Received on Sat Jun 26 1999 - 14:23:23 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US