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.