joseleonweb

Untitled

Jan 29th, 2021
625
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.45 KB | None | 0 0
  1. import java.util.Random;
  2.  
  3. public class RandomExample {
  4.  
  5.     public static void main(String[] args) {
  6.         Random rndNum = new Random();
  7.         System.out.println("Random Number 1: " + rndNum.nextInt());
  8.         System.out.println("Random Number 2: " + rndNum.nextInt());
  9.         System.out.println("Random Number 3: " + rndNum.nextInt());
  10.         System.out.println("Random Number 4: " + rndNum.nextInt());
  11.         System.out.println("Random Number 5: " + rndNum.nextInt());
  12.     }
  13. }
Advertisement
Add Comment
Please, Sign In to add comment