Hi, In the below mentioned code, value of x and y is printed as 3 and 7. I have a doubt, as I understand scope of variable used in the method is only till the method exists. Once the method is finished variable used in method will also not exist. Why in this case method variable is overwritting the class variable?
Thanks in advance for your help!!!