Results 1 to 5 of 5
Thread: Random number
- 11-03-2012, 06:52 PM #1
Member
- Join Date
- Nov 2012
- Posts
- 1
- Rep Power
- 0
- 11-03-2012, 07:00 PM #2
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 11,405
- Blog Entries
- 7
- Rep Power
- 17
Re: Random number
When people rob a bank they get a penalty; when banks rob people they get a bonus.
-
Re: Random number
You can use the Random class which has a method called nextInt(range) which returns a number from 0 to range - 1. Just use the appropriate range, and then subtract 1000 from the returned int.
- 11-03-2012, 07:03 PM #4
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 11,405
- Blog Entries
- 7
- Rep Power
- 17
Re: Random number
Man, do I feel fast today.
kind regards,
Jos ;-)When people rob a bank they get a penalty; when banks rob people they get a bonus.
-
Re: Random number
Last edited by Fubarable; 11-03-2012 at 07:27 PM.
Similar Threads
-
Random number not gen. number 0???
By Mr U in forum New To JavaReplies: 2Last Post: 10-17-2012, 02:18 AM -
Help with my first program. Random number gen.
By bobmiknob in forum New To JavaReplies: 1Last Post: 09-25-2011, 12:43 AM -
Generating a random number
By oridov in forum New To JavaReplies: 2Last Post: 11-29-2008, 05:12 PM -
Random number help
By jgonzalez14 in forum New To JavaReplies: 5Last Post: 09-16-2008, 09:13 AM -
Random number
By jithan in forum Advanced JavaReplies: 1Last Post: 06-13-2008, 01:42 PM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks