Add element into array java
<p>Here's what the layout is</p>

<pre><code>index   num 
0      [10]
1      [20]
2      [30]
 (Add 35 here)
3      [40] Move elements down
4      [50]
5      [60]
6      [70]
</code></pre>

<p>then my method is this</p>

<pre><code>public static void method(int[] num, int index, int addnum)
{

}
</code></pre>

<p>How can i add 35 in there?</p>

<p>Tried this:</p>

<pre><code>public static void method(int[] num, int index, int addnum)
{
int index = 10;
for(int k = num.length k&gt;3; k++)
{
        Num[k]=num[k++]
}
    Num[3] = 35;
</code></pre>
