Hi please explain these lines of code for me
<p>So I was given a code in class on a explanation on arrays, I didn't really understand my lecturer so I was wondering If someone code explain the last few lines of codes for me.
I understand that
the first while loop is that is the integer in the array is less than the number of integer it will make the value for that array in R1 the same as R2, then it will proceed to the next integer, then I'm pretty hazy from there.</p>

<p>Thank you in advance for your help if you can.</p>

<pre><code>public int[] array(int[] R1, int num){
    int[] R2 = new int[R1.length + 1];
    int i =0;
    while (R1[i] &lt; num) {
        R2[i] = R1[i]; 
        i++;
        R2[i] = num;
    }

    while (i&lt;R1.length &amp;&amp; R1[i] &gt;= num) {
        R2[i+1] = R1[i];
        i++;
    }

    return R2;
}
</code></pre>
