On Wed, 2006-11-15 at 06:33 +0800, Tamas Szabo wrote: > Well, it isn't a global field is an instance variable of your class. > And there is another way to access it. Just rename either the instance > variable or the local variable. > > Tamas
Right. While it is possible to do this, it does make it difficult to read the code. Better to use two different variable names. Then you never have to worry about which variable you're actually using, or mistakenly use the instance variable because you *thought* the local one was still in scope, when it was not. Actually the one exception I employ is with setter methods: public void setFoo( Object foo ) { this.foo = foo; } Chris -- Christopher D. Goldman [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]