Common design practice is to make instance variables private and have public getters and setters to access them. But many times I have seen code samples on the internet that
Sometimes when you would want make the class immutable, it is just one of the things you need to do. And don't have setter methods at all in that case.