explain this java code please
<p>In this program if I enter 10 when it says enter a value what would be the output? <code>num1</code> becomes 10, while <code>num2</code> is 6, I don't understand what <code>num1 = num1</code> mean? <code>10 = 10 + 2 = 12</code>?</p>

<p>I think I understood it, it takes 10 from the user, <code>num1</code> is then assigned the value of <code>num1 + 2</code>, which is 12. <code>num2</code> then becomes <code>num1</code>, <code>12</code> then <code>12/6 = 2</code>.</p>

<p>Output: 2</p>

<pre><code>import java.util.*;

public class Calculate
{
    public static void main (String[] args)
    {
        Scanner sc = new Scanner(system.in);
        int num1, num2;
        num2 = 6;
        System.out.print("Enter value");
        num1 = sc.nextInt();
        num1 = num1 + 2;
        num2 = num1 / num2;
        System.out.println("result = " + num2);
    }
}
</code></pre>
