Blonk

Untitled

Feb 18th, 2020
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.51 KB | None | 0 0
  1. import java.util.Random;
  2. import java.util.*;
  3. import java.util.concurrent.ThreadLocalRandom;
  4.  
  5. public class Main {
  6.  
  7.     public static void main(String[] args) {
  8.  
  9.         Random rand = new Random();
  10.  
  11.         int[] myList;
  12.         myList = new int [10];
  13.  
  14.         int slot = 0;
  15.  
  16.         for (int i = 0; i < myList.length; i++) {
  17.             myList[1] = rand.nextInt(101);
  18.             System.out.println("The Slot " + slot + " contains a: " + myList[1]);
  19.             slot = slot + 1;
  20.         }
  21.     }
  22. }
Advertisement
Add Comment
Please, Sign In to add comment