title: How to add a value to a specified index of array
body: <p>I tried to add an integer to the 4th index of the array. But it is adding after remove the 4th element.</p>
  
  <pre><code>int ar[] = {1,2,3,4,5,7,8,9};       
  int position = 4;
  for(int i=0;i&lt;ar.length;i++){
  if(i==position){
          ar[i] = 6;
  }
  System.out.println(ar[i]);
  }
  </code></pre>