Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

import java.util.Random;

public class Main {
    public static void main(String[] argv) throws Exception {

        Random rand = new Random();

        boolean b = rand.nextBoolean();
        long l = rand.nextLong();
        float f = rand.nextFloat(); // 0.0 <= f < 1.0
        double d = rand.nextDouble(); // 0.0 <= d < 1.0
    }
}