title: Overwrite an Array
body: <p>I am new at Java and I am trying to overwrite an array like the following: <code>{2,7,6,1,9}</code> to <code>{9,13,7,10,9}</code>. So I am trying to add up neighbouring numbers in an array and overwrite the first number with the sum. My code looks like this:</p>
  
  <pre><code>int add = numbers[i] + numbers[i+1];
  int[] numbersAdd = new int[numbers.length];
  i = 1;
  int j = 1;
  while(j &lt; numbers.length) {
      numbersAdd[j] = add;
      i++;
      j++;
  }
  </code></pre>
  
  <p>I get always an <code>IndexOutofBoundException</code>.
  Can you help me with that? Thank you!</p>