public static int fun() { int left1 = left; System.out.println(left1); int right1 = right; System.out.println(right1); .... }
System.out.printlnis able to print out those 2 integer values. However, unfortunately, when I tried to watch Quote:
left1, right1, either in the view of Quote:
Variablesor Quote:
Expressions, I got weird numbers different from my expectation. Well, I was expecting to see the values Quote:
left1==left, right1==right. But, they r of different values. Why is it so? Does it have something to do with the static functions? I don't think so because every main function is defined as static. Any other reasons? Can anybody help to explain it a bit please?