I\'m reading my Deitel, Java How to Program book and came across the term shadowing. If shadowing is allowed, what situation or what purpose is there for it in a Ja
It can be useful for setters where you don't want to have to create a separate variable name just for the method parameter eg:
public void setX(int x) { this.x = x; }
Apart from that I'd avoid them.