javaoopinheritancecouplingcohesion

Can adhering to the JavaBeans naming standard aid in achieving encapsulation?


Is it possible that java beans naming standards help in achieving encapsulation?

Isn't it the access modifier that helps in encapsulation?


Solution

  • No. Naming standards don't do, open or restrict anything. For encapsulation you will of course need access modifiers. Best is to use both. That helps understanding your code even if you didn't look at it for some time or if you indend to share it.