posted 18 years ago
Line 1 print statement is printing 1 only. but I am getting the answer 2.obviously, inside the method m1 ,we can get class variable value 1.after executing x=x++ ,in the stack one new x variable is created with 2 value.How come it is giving 1 value after the execution of x++.