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[] args) {
        for (int loop = 1; loop <= 1000; loop++) {
            int random1 = new Random().nextInt(100);
            int random2 = new Random().nextInt(100);
            if (random1 == random2) {
                System.out.println("Duplicate: " + random1);
            }
        }
    }
}