posted 19 years ago
Hi,
In the above code, when the method g() is invoked, it is passed instance variable b and array c[]. In the method g() itself there are local variables with the same names as the instance variables b & c[]. so, when you are setting b = 0, you are actually changing the local variable and not the instance variable. But variable a in the method g() is not local coz it has not been declared locally, so when u set "a" to 0 , you are actually changing the instance variable. So the result will be 101.