title: How to add values from a random constructor class inside an array of your main class?
body: <p>Here is the method I'm using on my main class "Arrays" </p>
  
  <p><strong>My main class "Arrays" CANNOT contain any Libraries</strong></p>
  
  <pre><code>  public static int[] generateRandom(int n)
    {
      int[] randomArray = new int[n];
  
      for (int i = 0; i &lt; randomArray.length; i++)
      {
        //randomArray[i] =  ; // how do i fill it from the Random1 class?
      }
        return randomArray;
     }
  </code></pre>
  
  <p>I need to fill randomArray with random numbers from the class Random1. (I called it Random1 because for some reason it interfered with util.Random, but I would be happier with a class called Random.</p>
  
  <pre><code> import java.util.Random;
  
   public class Random1
    {
     public Random1()
     {
      Random r = new Random(1);
      int num = r.nextInt(Integer.MAX_VALUE);
      System.out.print(" " + num);
    }
   }
  </code></pre>
  
  <p>Can you please help me with my 2 problems?</p>
  
  <p>1) I need to fill the array in "Arrays" with the generated random numbers from Random1</p>
  
  <p>2) I would like to be able to use it as Random and not Random1 because the integer bothers me.</p>