title: Shifting array to the right - homework
body: <p>This is what I have so far, but when I run it, I get a Java mismatch error.
  This is my array:</p>
  
  <pre><code>char[] letters = {'A', 'B' , 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J'};
  
  
  /********************************************************************************
      shiftRight() will move the contents of the array one slot to the right
  ********************************************************************************/
  public static void shiftRight( char [] letters )
  {
      char last = letters[letters.length-1];          // save off first element
  
      // shift right
      for( int index =letters.length-1; index &gt;= 0 ; index-- )
          letters[index+1] = letters [index];
  
      // wrap last element into first slot
      letters[0] = last;
      System.out.print("\nshifted Array: " );
  }
  </code></pre>