Results 1 to 2 of 2
  1. #1
    sara12345 is offline Member
    Join Date
    Dec 2009
    Posts
    59
    Rep Power
    0

    Default generating random number between 0 and 1

    hello
    can somebody tell me how to generate double random number between 0 and 1
    I have used the following but it gives me an error
    random.nextDouble(1.0)

    thanks

  2. #2
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    26

Similar Threads

  1. problems generating random objects
    By mandangalo in forum New To Java
    Replies: 8
    Last Post: 07-30-2010, 05:42 AM
  2. Powerball Example (Generating Random Numbers)
    By a7x75 in forum New To Java
    Replies: 8
    Last Post: 02-12-2010, 03:38 PM
  3. Replies: 12
    Last Post: 09-23-2009, 10:14 AM
  4. Generating a random number
    By oridov in forum New To Java
    Replies: 2
    Last Post: 11-29-2008, 06:12 PM
  5. generating random numbers in a 5x5 array.
    By acidacid in forum New To Java
    Replies: 3
    Last Post: 08-14-2007, 04:44 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •