Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import java.util.Random;

public class Main {
    public static String getRandomNum() {
        StringBuffer sb = new StringBuffer();
        Random random = new Random();
        for (int i = 0; i < 3; i++) {
            sb.append(random.nextInt(9));
        }
        return sb.toString();
    }
}