Well why would the compiler complain at all ? A member variable of the class and a local variable of the method are entirely different in all aspects . I dont think its a matter of preference , but the method show() can not see the variable 'x' directly like this. Non static Member variables have to be accessed via this.x .
Muhammad Saif Asif Mirza
OCJA(5/6) OCJP(6) OCJWCD(6)