Advertisement
Blonk

Untitled

Feb 20th, 2020
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.76 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[9];
  13.  
  14.         int[] twoList;
  15.         twoList = new int[10];
  16.  
  17.  
  18.         int slot = 0;
  19.  
  20.         System.out.print("Array 1: ");
  21.         for (int i = 0; i < myList.length; i++) {
  22.             myList[1] = rand.nextInt(100);
  23.             System.out.print(myList[1] + " ");
  24.         } System.out.print("-7");
  25.  
  26.  
  27.  
  28.         System.out.print("\nArray 2: ");
  29.         for (int i = 0; i < twoList.length; i++) {
  30.             twoList[1] = rand.nextInt(100);
  31.             System.out.print(twoList[1] + " ");
  32.         }
  33.     }
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement