MrDoyle

Arrays) Basic Arrays 3

Jan 25th, 2021
350
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import java.util.Random;
  2.  
  3. public class Main {
  4.  
  5.     public static void main(String[] args) {
  6.         Integer [] Array3 = new Integer[1000];
  7.         Random rand = new Random();
  8.  
  9.         for (int i = 0 ; i < Array3.length ; i++) {
  10.             int rand_int1 = rand.nextInt(90) + 10;
  11.             Array3[i] = rand_int1;
  12.  
  13.         }
  14.  
  15.         for (int j = 1 ; j <= (Array3.length); j++) {
  16.             System.out.print(Array3[j-1] + "  ");
  17.  
  18.             if (j % 20 == 0) {
  19.             System.out.println();
  20.             }
  21.  
  22.         }
  23.  
  24.     }
  25. }
RAW Paste Data