> bug in j2me Random implementation?
> From:
[quoted text clipped - 30 lines]
>
> same type of result for long, double, short.
Which documentation are you using for the J2ME API?
Patricia
tom arnll - 28 Sep 2006 17:44 GMT
>> bug in j2me Random implementation?
>> From:
[quoted text clipped - 34 lines]
>
> Patricia
egg on face! i tried it again this a.m. and it works. have no idea of what i
changed to make things different. thanks for your posts.
tom arnall

Signature
Posted via a free Usenet account from http://www.teranews.com
> bug in j2me Random implementation?
> From:
[quoted text clipped - 20 lines]
> java.util.Random cannot be applied to (int)
> System.out.println(rand.nextInt(5));
That method doesn't exist in the J2ME version. The J2ME java.* classes
correspond to JDK 1.1 classes. The nextInt(int) method was introduced in
J2SE 1.2.
If you need this method, you can extend the Random class and add this
method (just cut and paste it from the source of the Java SE version of
java.util.Random).
> yet the doc' for Random states in the methods section:
>
[quoted text clipped - 4 lines]
> random number generator's sequence.
> same type of result for long, double, short.
You're reading the wrong version of the documentation, you need the J2ME
docs.
Dan.

Signature
Daniel Dyer
http://www.uncommons.org
kloro - 27 Sep 2006 18:31 GMT
> > bug in j2me Random implementation?
> > From:
[quoted text clipped - 40 lines]
> You're reading the wrong version of the documentation, you need the J2ME
> docs.
following is the url of the doc' section from which i quoted, as set up
by the WTK2.2 installer:
file:///home/kloro/cell/WTK2.2/docs/api/midp/java/util/Random.html#next(int)
kloro - 27 Sep 2006 21:27 GMT
> > > bug in j2me Random implementation?
> > > From:
[quoted text clipped - 45 lines]
>
> file:///home/kloro/cell/WTK2.2/docs/api/midp/java/util/Random.html#next(int)
sorry, make that url:
file:///home/kloro/cell/WTK2.2/docs/api/midp/java/util/Random.html#nextInt(int)