Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Random;
- import java.util.*;
- import java.util.concurrent.ThreadLocalRandom;
- public class Main {
- public static void main(String[] args) {
- Random rand = new Random();
- int[] myList;
- myList = new int [10];
- int slot = 0;
- for (int i = 0; i < myList.length; i++) {
- myList[1] = rand.nextInt(101);
- System.out.println("The Slot " + slot + " contains a: " + myList[1]);
- slot = slot + 1;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment