java.util.Random.nextLong() 方法


java.util.Random.nextLong() 方法

package com.codingdict;

import java.util.*;

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

      // create random object
      Random randomno = new Random();

      // get next long value
      long value = randomno.nextLong();

      // check the value  
      System.out.println("Long value is: " + value);
   }    
}