title: passing variable from random number generator class
body: <p>Instead of writing:</p>
  
  <pre><code> Random randomGenerator = new Random();
   for (int idx = 5; idx &lt;= 15; ++idx){
   int randomInt = randomGenerator.nextInt(1);
  </code></pre>
  
  <p>each time I need a random number in a function, Is it possible to just pass or call the result from a random number generator class into the function?</p>
  
  <p>For Example, I have one function in particular which is receiving variables from another class</p>
  
  <pre><code>favoriteTracks(String fromExampleClass1, String fromExampleClass1again)
  </code></pre>
  
  <p>could I do</p>
  
  <pre><code>favoriteTracks(String fromExampleClass1, String fromExampleClass1again, Long fromRNGclass)
  </code></pre>
  
  <p>for clarification:
  My one function "favoriteTracks" requires variables passed from "ExampleClass1".
  At the same time, I want it to receive a random number as a variable (or call it, whichever is easiest). generated in another class by </p>
  
  <pre><code>public static long randomNum(){
  Random randomGenerator = new Random();
  for (int idx = 5; idx &lt;= 15; ++idx){
  int randomInt = randomGenerator.nextInt(1);
  </code></pre>