Hi all.
I'm used to develop POJO's with simply private attributes and public assessor methods, even with inheritance involved.
This thins is, in the simple example of a POJO in the manual reference, i find public getters but i find:
- default setters (no modifier)
- protected setters (in child classes)
My question is, is there any optimizing or other reasons for this? I use inheritance all the time but i tend to place the whole "family tree" in the same package.
Thanks in advance for any replies.
|