Skip to Main Content

New to Java

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to include negative numbers in random number generation?

807599Mar 13 2007 — edited Mar 13 2007
Hello,

I have been trying to create 100 random integers that has just -1, 0 and 1. But since this range has a negative number, I'm confused as what method to use. Any help would be greatly appreciated.

Thanks.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 10 2007
Added on Mar 13 2007
6 comments
2,090 views