This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
It's not clear to me how your setAddr and getAddr methods are being called.
However, if setAddr method just sets the value of the instance variable addr, then presumably getAddr is going to return the value of your instance variable to some other method or class. So shouldn't your getAddr() method just return addr, and not actually set its value a second time?
p.s. ok two people got in ahead of me as I was typing my note.