Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

import java.math.BigInteger;
import java.util.Random;

public class Main {

    public static void main(String[] args) {

        int bitLength = 3;

        // create a random object
        Random rnd = new Random();

        BigInteger bi = BigInteger.probablePrime(bitLength, rnd);

        System.out.println(bi);
    }
}