title: Swapping references in an Array
body: <p>Ok, I was misunderstanding the problem. After reading it a couple of times I figured out <code>randInt</code> is actually the method itself i am using to populate the array. So when it says to call <code>randInt</code> its some sort of recursive call I think. This is somehow what it should look like: </p>
  
  <pre><code>  static int[] randInt(int i, int j) {
      int[] temp = new int[(j - i) + 1];
      for ( i = 0; i &lt; j; i++) {
          temp[i] = i + 1; // here i populate the array
      }
      System.out.println(Arrays.toString(temp)); // this prints [1, 2, 3, 4, 5]
      for ( i = 1; i &lt; j;i++){
          swapReferences(temp[i], temp[randInt(0,i)] ); //this is some sort of recursive call that swaps the references 
          // btw that statement does not compile, how can i pass a method as a parameter?
  
  
  
      }
      return temp;
  }
  
  static void swapReferences(int a, int b) { //these parameters are wrong, need to be changed
     //Method to swap references
  
  }
  </code></pre>
  
  <p>Sorry for the confusion, but I think thats how it should be correctly.</p>