It’s suggested that no variable should be public in OOD. If you make your variable private, in order to access the data for reading or updating, you need getters and setters, but this seems nonsense at first since you are still able to access it with additional bureaucracy.
I would like to give an example to explain. Let’s say you have a month variable which is an integer. This month variable should hold a value between 1 and 12 inclusively, right?