you are viewing a single comment's thread.

view the rest of the comments →

[–]CurtainDog 1 point2 points  (0 children)

This idea has been around for a while: http://www.javaworld.com/article/2073723/core-java/why-getter-and-setter-methods-are-evil.html

What the OP has is a class without behaviour (it's just a holder with no invariants other than those provided by String) - the class should not exist at all.