Question: Here's what the layout is

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

```

then my method is this

```
public static void method(int[] num, int index, int addnum)
{

}

```

How can i add 35 in there?

Tried this:

```
public static void method(int[] num, int index, int addnum)
{
int index = 10;
for(int k = num.length k>3; k++)
{
        Num[k]=num[k++]
}
    Num[3] = 35;

```

Answer: 
Very crudely, you want to do something like this:

```
public static void(int[] num, int index, int addnum)
{    
    // initialize new array with size of current array plus room for new element
    int[] newArray = new int[num.length + 1]; 

    // loop until we reach point of insertion of new element
    // copy the value from the same position in old array over to
    // same position in new array
    for(int i = 0; i < index; i++)
    {
        newArray[i] = num[i]; 
    }
    i = i + 1; // move to position to insert new value

    newArray[i] = addnum; // insert the value

    // loop until you reach the length of the old array 
    while(i < num.length)
    {
        newArray[i] = num[i-1];
    }

    // finally copy last value over
    newArray[i + 1] = num[i]; 
}

```
What you're looking for is an [insertion sort](http://www.roseindia.net/java/beginners/arrayexamples/InsertionSort.shtml).

It's classwork, so it's up to you to figure out the proper code.