title: Java: Shift/Rotate Object Array
body: <p>My question should actually be really simple:
  I have an object array of Players.(players[])
  I want to have a function that rotates this array until an index:</p>
  
  <pre><code>public void rotateArray(Object[] array, int index)
  </code></pre>
  
  <p>This would convert</p>
  
  <pre><code>{Player1, Player2, Player3, Player4, Player5}
  </code></pre>
  
  <p>with an index of 2 to:</p>
  
  <pre><code>{Player3, Player4, Player5, Player1, Player2}
  </code></pre>
  
  <p>But I want to prevent issues with references.
  I've tried System.arraycopy() but either I was to dumb to get it working or I is the wrong method for this.</p>