int x = 5;
int y = 2 * x;
System.out.println(y);
x = 10;
System.out.println(y);

The output of the above code is 10 & 10 not 10 & 20. Just because x is changed y is not automagically updated....