In C++ a getter & setter for a private data member is very useful due to the ability to control mutability via a const
return value.
In Java, if I understand correctly (please correct me if I am mistaken), specifying final
on a getter doesn't work that way. Once the caller received the data member reference through the getter, it can modify it, despite it being private...
If that's the case (and please correct me if I have a gross misconception here), why not declare the data member public
and simplify things?