Random

ReturnMethodSummary
static doublerandom()Returns a random double value between 0.0 and 1.0.

public class Main {
  public static void main(String[] args) {

    System.out.println(Math.random());
  }
}

The output:


0.46169271289864633
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.