Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Random;
- public class RandomExample {
- public static void main(String[] args) {
- Random rndNum = new Random();
- System.out.println("Random Number 1: " + rndNum.nextInt());
- System.out.println("Random Number 2: " + rndNum.nextInt());
- System.out.println("Random Number 3: " + rndNum.nextInt());
- System.out.println("Random Number 4: " + rndNum.nextInt());
- System.out.println("Random Number 5: " + rndNum.nextInt());
- }
- }
RAW Paste Data